RomoteController.java
1.44 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package com.sitech.util.upload;
import java.util.List;
import java.util.Vector;
public interface RomoteController {
public String getIpAddr();
public boolean isAuthorized();
/**
* 执行命令
*
* @param command
* 命令字符串
*/
public void doCommand(String command);
/**
* 得到执行结果
*
* @return
*/
public String getResult();
public Vector<String> getResultAsVector(String cmd);
public String getResultAsStr(String cmd);
/**
* 路径是否存在
*
* @param dir
* @return
*/
public boolean isExistDir(String dir);
/**
* 初始化
*/
public void initial();
/**
* 关闭
*/
public void close();
/**
* 根据关键字和用户判断进程是否存在
*
* @param keywords
* 关键字
* @param username
* 用户名
* @return
*/
public boolean isRunning(String keywords, String username);
public boolean isRunning(String keywords);
/**
* 得到目标目录下的文件数-包括文件目录
*
* @param dir
* @return
*/
public int childCountOfDir(String dir);
/**
* 在远程主机主机上创建目录
*
* @param dir
* @return
*/
public boolean createDir(String dir);
public boolean isUsed(int port);
public String executeCommand(List<String> commandList) throws Exception;
public String executeCommand(String command) throws Exception;
public RomoteController cloneObject();
public String getError();
}