Merge fac39aff0d into 5ab42ddf80
This commit is contained in:
commit
1b503a16e2
|
|
@ -85,6 +85,16 @@ public abstract class ApiConnection implements AutoCloseable {
|
||||||
*/
|
*/
|
||||||
public abstract List<Map<String, String>> execute(String cmd) throws MikrotikApiException;
|
public abstract List<Map<String, String>> execute(String cmd) throws MikrotikApiException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* execute a command and return a list of results.
|
||||||
|
*
|
||||||
|
* @param cmd Command to execute
|
||||||
|
* @param timeout The connection timeout to use when executing the command.
|
||||||
|
* @return The list of results
|
||||||
|
* @throws me.legrange.mikrotik.MikrotikApiException Thrown if the API encounters an error executing a command.
|
||||||
|
*/
|
||||||
|
public abstract List<Map<String, String>> execute(String cmd, int timeout) throws MikrotikApiException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute a command and attach a result listener to receive it's results.
|
* execute a command and attach a result listener to receive it's results.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -67,6 +67,11 @@ public final class ApiConnectionImpl extends ApiConnection {
|
||||||
return execute(Parser.parse(cmd), timeout);
|
return execute(Parser.parse(cmd), timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<Map<String, String>> execute(String cmd, int timeout) throws MikrotikApiException {
|
||||||
|
return execute(Parser.parse(cmd), timeout);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String execute(String cmd, ResultListener lis) throws MikrotikApiException {
|
public String execute(String cmd, ResultListener lis) throws MikrotikApiException {
|
||||||
return execute(Parser.parse(cmd), lis);
|
return execute(Parser.parse(cmd), lis);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue