Ваш класс doPing определен как implements Callable<String>
. Это означает, что он должен реализовывать метод call()
, который не принимает аргументов . Вот определение Callable
:
public interface Callable<V> {
V call() throws Exception;
}
Вам нужно будет удалить аргумент String IPtoPing
, если вы хотите, чтобы doPing
было Callable
:
public class doPing implements Callable<String> {
// you need to define this method with no arguments to satisfy Callable
public String call() throws Exception {
...
}
// this method does not satisfy Callable because of the IPtoPing argument
public String call(String IPtoPing) throws Exception {
...
}
}