Subversion Repositories XServices

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
66 brianR 1
/*
2
 *   Copyright 2011 Brian Rosenberger (Brutex Network)
3
 *
4
 *   Licensed under the Apache License, Version 2.0 (the "License");
5
 *   you may not use this file except in compliance with the License.
6
 *   You may obtain a copy of the License at
7
 *
8
 *       http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 *   Unless required by applicable law or agreed to in writing, software
11
 *   distributed under the License is distributed on an "AS IS" BASIS,
12
 *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 *   See the License for the specific language governing permissions and
14
 *   limitations under the License.
15
 */
16
 
46 brianR 17
package net.brutex.xservices.ws;
18
 
19
import javax.jws.WebMethod;
20
import javax.jws.WebParam;
21
import javax.jws.WebService;
22
 
23
import net.brutex.xservices.types.HostConnection;
24
import net.brutex.xservices.types.ReturnCode;
25
import net.brutex.xservices.util.BrutexNamespaces;
26
 
65 brianR 27
/**
28
 * @author brosenberger
29
 *
30
 */
46 brianR 31
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
32
public interface ExecuteService {
33
 
65 brianR 34
	/**
35
	 * @param cmd
36
	 * @param args
37
	 * @param timeout
38
	 * @return
39
	 */
46 brianR 40
	@WebMethod(operationName = "runCommand")
41
	public abstract ReturnCode runCommand(
42
			@WebParam(name = "executable") String cmd,
43
			@WebParam(name = "argline") String args,
44
			@WebParam(name = "timeout") long timeout);
45
 
65 brianR 46
	/**
47
	 * @param cmd
48
	 * @param args
49
	 * @param timeout
50
	 * @return
51
	 */
46 brianR 52
	@WebMethod(operationName = "runCommandWithArgs")
53
	public abstract ReturnCode runCommandWithArgs(
54
			@WebParam(name = "executable") String cmd,
55
			@WebParam(name = "arg") String[] args,
56
			@WebParam(name = "timeout") long timeout);
57
 
65 brianR 58
	/**
59
	 * @param cmd
60
	 * @param args
61
	 * @return
62
	 */
46 brianR 63
	@WebMethod(operationName = "runCommandAsync")
64
	public abstract ReturnCode runCommandAsync(
65
			@WebParam(name = "executable") String cmd,
66
			@WebParam(name = "argline") String args);
67
 
65 brianR 68
	/**
69
	 * @param cmd
70
	 * @param args
71
	 * @return
72
	 */
46 brianR 73
	@WebMethod(operationName = "runCommandAsyncWithArgs")
74
	public abstract ReturnCode runCommandAsyncWithArgs(
75
			@WebParam(name = "executable") String cmd,
76
			@WebParam(name = "arg") String[] args);
77
 
65 brianR 78
	/**
79
	 * @param host
80
	 * @param cmd
81
	 * @param timeout
82
	 * @return
83
	 */
46 brianR 84
	@WebMethod(operationName = "runCommandWithSSH")
85
	public abstract ReturnCode runCommandWithSSH(
58 brianR 86
			@WebParam(name = "host") HostConnection host,
46 brianR 87
			@WebParam(name = "command") String cmd,
88
			@WebParam(name = "timeout") long timeout);
89
 
65 brianR 90
	/**
91
	 * @param host
92
	 * @param keyfile
93
	 * @param cmd
94
	 * @param timeout
95
	 * @return
96
	 */
46 brianR 97
	@WebMethod(operationName = "runCommandWithSSHKeyAuth")
98
	public abstract ReturnCode runCommandWithSSHKeyAuth(
58 brianR 99
			@WebParam(name = "host") HostConnection host,
46 brianR 100
			@WebParam(name = "keyfile") String keyfile,
101
			@WebParam(name = "command") String cmd,
102
			@WebParam(name = "timeout") long timeout);
103
 
65 brianR 104
	/**
105
	 * @param host
106
	 * @param cmd
107
	 * @param timeout
108
	 * @return
109
	 */
46 brianR 110
	@WebMethod(operationName = "rExec")
111
	public abstract ReturnCode rExec(
112
			@WebParam(name = "host") HostConnection host,
113
			@WebParam(name = "command") String cmd,
114
			@WebParam(name = "timeout") long timeout);
115
 
65 brianR 116
	/**
117
	 * @param host
118
	 * @param prompt
119
	 * @param cmd
120
	 * @param expect
121
	 * @param timeout
122
	 * @return
123
	 */
46 brianR 124
	@WebMethod(operationName = "telnet")
125
	public abstract ReturnCode runTelnet(
126
			@WebParam(name = "host") HostConnection host,
127
			@WebParam(name = "prompt") String prompt,
128
			@WebParam(name = "command") String cmd,
129
			@WebParam(name = "expect") String expect,
130
			@WebParam(name = "timeout") long timeout);
131
 
132
}