Subversion Repositories XServices

Rev

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

Rev 69 Rev 70
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
import javax.xml.bind.annotation.XmlElement;
22
 
23
 
23
import net.brutex.xservices.types.HostConnection;
24
import net.brutex.xservices.types.HostConnection;
24
import net.brutex.xservices.types.ReturnCode;
25
import net.brutex.xservices.types.ReturnCode;
25
import net.brutex.xservices.util.BrutexNamespaces;
26
import net.brutex.xservices.util.BrutexNamespaces;
26
 
27
 
27
/**
28
/**
28
 * Task execution web service
29
 * Task execution web service
-
 
30
 * 
29
 * @author Brian Rosenberger
31
 * @author Brian Rosenberger
30
 * @since 0.1.0
32
 * @since 0.1.0
31
 *
33
 *
32
 */
34
 */
33
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
35
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
34
public interface ExecuteService {
36
public interface ExecuteService {
35
 
37
 
36
	/**
38
	/**
37
	 * @param cmd
39
	 * @param cmd
38
	 * @param args
40
	 * @param args
39
	 * @param timeout
41
	 * @param timeout
40
	 * @return
42
	 * @return
41
	 */
43
	 */
42
	@WebMethod(operationName = "runCommand")
44
	@WebMethod(operationName = "runCommand")
43
	public abstract ReturnCode runCommand(
45
	public abstract ReturnCode runCommand(
44
			@WebParam(name = "executable") String cmd,
46
			@WebParam(name = "executable") String cmd,
45
			@WebParam(name = "argline") String args,
47
			@WebParam(name = "argline") String args,
46
			@WebParam(name = "timeout") long timeout);
48
			@WebParam(name = "timeout") long timeout);
47
 
49
 
48
	/**
50
	/**
49
	 * @param cmd
51
	 * @param cmd
50
	 * @param args
52
	 * @param args
51
	 * @param timeout
53
	 * @param timeout
52
	 * @return
54
	 * @return
53
	 */
55
	 */
54
	@WebMethod(operationName = "runCommandWithArgs")
56
	@WebMethod(operationName = "runCommandWithArgs")
55
	public abstract ReturnCode runCommandWithArgs(
57
	public abstract ReturnCode runCommandWithArgs(
56
			@WebParam(name = "executable") String cmd,
58
			@WebParam(name = "executable") String cmd,
57
			@WebParam(name = "arg") String[] args,
59
			@WebParam(name = "arg") String[] args,
58
			@WebParam(name = "timeout") long timeout);
60
			@WebParam(name = "timeout") long timeout);
59
 
61
 
60
	/**
62
	/**
61
	 * @param cmd
63
	 * @param cmd
62
	 * @param args
64
	 * @param args
63
	 * @return
65
	 * @return
64
	 */
66
	 */
65
	@WebMethod(operationName = "runCommandAsync")
67
	@WebMethod(operationName = "runCommandAsync")
66
	public abstract ReturnCode runCommandAsync(
68
	public abstract ReturnCode runCommandAsync(
67
			@WebParam(name = "executable") String cmd,
69
			@WebParam(name = "executable") String cmd,
68
			@WebParam(name = "argline") String args);
70
			@WebParam(name = "argline") String args);
69
 
71
 
70
	/**
72
	/**
71
	 * @param cmd
73
	 * @param cmd
72
	 * @param args
74
	 * @param args
73
	 * @return
75
	 * @return
74
	 */
76
	 */
75
	@WebMethod(operationName = "runCommandAsyncWithArgs")
77
	@WebMethod(operationName = "runCommandAsyncWithArgs")
76
	public abstract ReturnCode runCommandAsyncWithArgs(
78
	public abstract ReturnCode runCommandAsyncWithArgs(
77
			@WebParam(name = "executable") String cmd,
79
			@WebParam(name = "executable") String cmd,
78
			@WebParam(name = "arg") String[] args);
80
			@WebParam(name = "arg") String[] args);
79
 
81
 
80
	/**
82
	/**
81
	 * @param host
83
	 * @param host
82
	 * @param cmd
84
	 * @param cmd
83
	 * @param timeout
85
	 * @param timeout
84
	 * @return
86
	 * @return
85
	 */
87
	 */
86
	@WebMethod(operationName = "runCommandWithSSH")
88
	@WebMethod(operationName = "runCommandWithSSH")
87
	public abstract ReturnCode runCommandWithSSH(
89
	public abstract ReturnCode runCommandWithSSH(
88
			@WebParam(name = "host") HostConnection host,
90
			@WebParam(name = "host") HostConnection host,
89
			@WebParam(name = "command") String cmd,
91
			@WebParam(name = "command") String cmd,
90
			@WebParam(name = "timeout") long timeout);
92
			@WebParam(name = "timeout") long timeout);
91
 
93
 
92
	/**
94
	/**
93
	 * @param host
95
	 * @param host
94
	 * @param keyfile
96
	 * @param keyfile
95
	 * @param cmd
97
	 * @param cmd
96
	 * @param timeout
98
	 * @param timeout
97
	 * @return
99
	 * @return
98
	 */
100
	 */
99
	@WebMethod(operationName = "runCommandWithSSHKeyAuth")
101
	@WebMethod(operationName = "runCommandWithSSHKeyAuth")
100
	public abstract ReturnCode runCommandWithSSHKeyAuth(
102
	public abstract ReturnCode runCommandWithSSHKeyAuth(
101
			@WebParam(name = "host") HostConnection host,
103
			@WebParam(name = "host") HostConnection host,
102
			@WebParam(name = "keyfile") String keyfile,
104
			@WebParam(name = "keyfile") String keyfile,
103
			@WebParam(name = "command") String cmd,
105
			@WebParam(name = "command") String cmd,
104
			@WebParam(name = "timeout") long timeout);
106
			@WebParam(name = "timeout") long timeout);
105
 
107
 
106
	/**
108
	/**
107
	 * @param host
109
	 * @param host
108
	 * @param cmd
110
	 * @param cmd
109
	 * @param timeout
111
	 * @param timeout
110
	 * @return
112
	 * @return
111
	 */
113
	 */
112
	@WebMethod(operationName = "rExec")
114
	@WebMethod(operationName = "rExec")
113
	public abstract ReturnCode rExec(
115
	public abstract ReturnCode rExec(
114
			@WebParam(name = "host") HostConnection host,
116
			@WebParam(name = "host") HostConnection host,
115
			@WebParam(name = "command") String cmd,
117
			@WebParam(name = "command") String cmd,
116
			@WebParam(name = "timeout") long timeout);
118
			@WebParam(name = "timeout") long timeout);
117
 
119
 
118
	/**
120
	/**
119
	 * @param host
121
	 * @param host
120
	 * @param prompt
122
	 * @param prompt
121
	 * @param cmd
123
	 * @param cmd
122
	 * @param expect
124
	 * @param expect
123
	 * @param timeout
125
	 * @param timeout
124
	 * @return
126
	 * @return
125
	 */
127
	 */
126
	@WebMethod(operationName = "telnet")
128
	@WebMethod(operationName = "telnet")
127
	public abstract ReturnCode runTelnet(
129
	public abstract ReturnCode runTelnet(
128
			@WebParam(name = "host") HostConnection host,
130
			@WebParam(name = "host") HostConnection host,
129
			@WebParam(name = "prompt") String prompt,
131
			@WebParam(name = "prompt") String prompt,
130
			@WebParam(name = "command") String cmd,
132
			@WebParam(name = "command") String cmd,
131
			@WebParam(name = "expect") String expect,
133
			@WebParam(name = "expect") String expect,
132
			@WebParam(name = "timeout") long timeout);
134
			@WebParam(name = "timeout") long timeout);
-
 
135
	
-
 
136
	/**
-
 
137
	 * @param script
-
 
138
	 * @throws XServicesFault
-
 
139
	 */
-
 
140
	@WebMethod(operationName = "runJavaScript")
-
 
141
	public abstract void runJScript(
-
 
142
			@WebParam(name = "script") @XmlElement(required=true) String script) throws XServicesFault;
-
 
143
	
133
 
144
 
134
}
145
}
135
 
146
 
136
Generated by GNU Enscript 1.6.5.90.
147
Generated by GNU Enscript 1.6.5.90.
137
 
148
 
138
 
149