Subversion Repositories XServices

Rev

Rev 66 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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