Blame view

src/com/sitech/ismp/check/util/RemoteController.java 583 Bytes
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
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;
}