错误:(47,12)错误:方法声明无效;返回类型必填
CommunicationHandler
类是我的Singleton类,通过它我可以访问vmware中存在的api:
public class CommunicationHandler {
private CommunicationHandler instance;
public CommunicationHandler() {
if (instance == null) {
instance = new CommunicationHandler();
}
return;
}
private ApiConnection connection;
public boolean connect(String ip, String un, String pw) {
try {
connection = connect(ip);
connection.login(un, pw);
} catch(Exception e) {
e.toString();
}
return true;
}
private ApiConnection connect(String ip) {
return null;
}
public Execute(String command) throws MikrotikApiException {
connection.execute(command);
}
}