Subversion Repositories XServices

Rev

Rev 58 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
46 brianR 1
package net.brutex.xservices.ws;
2
 
3
import javax.jws.WebMethod;
4
import javax.jws.WebParam;
5
import javax.jws.WebService;
6
 
7
import net.brutex.xservices.types.HostConnection;
8
import net.brutex.xservices.types.ReturnCode;
9
import net.brutex.xservices.util.BrutexNamespaces;
10
 
65 brianR 11
/**
12
 * @author brosenberger
13
 *
14
 */
46 brianR 15
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
16
public interface ExecuteService {
17
 
65 brianR 18
	/**
19
	 * @param cmd
20
	 * @param args
21
	 * @param timeout
22
	 * @return
23
	 */
46 brianR 24
	@WebMethod(operationName = "runCommand")
25
	public abstract ReturnCode runCommand(
26
			@WebParam(name = "executable") String cmd,
27
			@WebParam(name = "argline") String args,
28
			@WebParam(name = "timeout") long timeout);
29
 
65 brianR 30
	/**
31
	 * @param cmd
32
	 * @param args
33
	 * @param timeout
34
	 * @return
35
	 */
46 brianR 36
	@WebMethod(operationName = "runCommandWithArgs")
37
	public abstract ReturnCode runCommandWithArgs(
38
			@WebParam(name = "executable") String cmd,
39
			@WebParam(name = "arg") String[] args,
40
			@WebParam(name = "timeout") long timeout);
41
 
65 brianR 42
	/**
43
	 * @param cmd
44
	 * @param args
45
	 * @return
46
	 */
46 brianR 47
	@WebMethod(operationName = "runCommandAsync")
48
	public abstract ReturnCode runCommandAsync(
49
			@WebParam(name = "executable") String cmd,
50
			@WebParam(name = "argline") String args);
51
 
65 brianR 52
	/**
53
	 * @param cmd
54
	 * @param args
55
	 * @return
56
	 */
46 brianR 57
	@WebMethod(operationName = "runCommandAsyncWithArgs")
58
	public abstract ReturnCode runCommandAsyncWithArgs(
59
			@WebParam(name = "executable") String cmd,
60
			@WebParam(name = "arg") String[] args);
61
 
65 brianR 62
	/**
63
	 * @param host
64
	 * @param cmd
65
	 * @param timeout
66
	 * @return
67
	 */
46 brianR 68
	@WebMethod(operationName = "runCommandWithSSH")
69
	public abstract ReturnCode runCommandWithSSH(
58 brianR 70
			@WebParam(name = "host") HostConnection host,
46 brianR 71
			@WebParam(name = "command") String cmd,
72
			@WebParam(name = "timeout") long timeout);
73
 
65 brianR 74
	/**
75
	 * @param host
76
	 * @param keyfile
77
	 * @param cmd
78
	 * @param timeout
79
	 * @return
80
	 */
46 brianR 81
	@WebMethod(operationName = "runCommandWithSSHKeyAuth")
82
	public abstract ReturnCode runCommandWithSSHKeyAuth(
58 brianR 83
			@WebParam(name = "host") HostConnection host,
46 brianR 84
			@WebParam(name = "keyfile") String keyfile,
85
			@WebParam(name = "command") String cmd,
86
			@WebParam(name = "timeout") long timeout);
87
 
65 brianR 88
	/**
89
	 * @param host
90
	 * @param cmd
91
	 * @param timeout
92
	 * @return
93
	 */
46 brianR 94
	@WebMethod(operationName = "rExec")
95
	public abstract ReturnCode rExec(
96
			@WebParam(name = "host") HostConnection host,
97
			@WebParam(name = "command") String cmd,
98
			@WebParam(name = "timeout") long timeout);
99
 
65 brianR 100
	/**
101
	 * @param host
102
	 * @param prompt
103
	 * @param cmd
104
	 * @param expect
105
	 * @param timeout
106
	 * @return
107
	 */
46 brianR 108
	@WebMethod(operationName = "telnet")
109
	public abstract ReturnCode runTelnet(
110
			@WebParam(name = "host") HostConnection host,
111
			@WebParam(name = "prompt") String prompt,
112
			@WebParam(name = "command") String cmd,
113
			@WebParam(name = "expect") String expect,
114
			@WebParam(name = "timeout") long timeout);
115
 
116
}