Subversion Repositories XServices

Rev

Rev 65 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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