RemoteController.java
583 Bytes
package com.sitech.ismp.check.util;
public interface RemoteController {
/**
* 初始化Telnet/ssh连接
* @throws Exception
*/
public void initial() throws Exception;
/**
* 执行command命令
* @param command
*/
public void doCommand(String command);;
/**
* 获取执行命令结果
* @return
*/
public String getResult();
/**
* 关闭连接
*/
public void close();
/**
* 获取执行命令结果(字符串方式)
* @param command
* @return
* @throws Exception
*/
public String getResultAsStr(String command) throws Exception;
}