Subversion Repositories XServices

Rev

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

Rev 85 Rev 87
1
/*
1
/*
2
 *   Copyright 2010 Brian Rosenberger (Brutex Network)
2
 *   Copyright 2010 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
package net.brutex.xservices.ws;
16
package net.brutex.xservices.ws;
17
 
17
 
18
import javax.jws.WebMethod;
18
import javax.jws.WebMethod;
19
import javax.jws.WebParam;
19
import javax.jws.WebParam;
20
import javax.jws.WebService;
20
import javax.jws.WebService;
21
import net.brutex.xservices.types.HostConnection;
21
import net.brutex.xservices.types.HostConnection;
22
import net.brutex.xservices.types.HostinfoType;
22
import net.brutex.xservices.types.HostinfoType;
23
import net.brutex.xservices.types.MailMimeType;
23
import net.brutex.xservices.types.MailMimeType;
24
import net.brutex.xservices.types.ReturnCode;
24
import net.brutex.xservices.types.ReturnCode;
-
 
25
import net.brutex.xservices.types.RuntimeInfoType;
25
import net.brutex.xservices.types.ant.FileSetResource;
26
import net.brutex.xservices.types.ant.FileSetResource;
26
import net.brutex.xservices.util.BrutexNamespaces;
27
import net.brutex.xservices.util.BrutexNamespaces;
27
 
28
 
28
import org.apache.cxf.aegis.type.java5.XmlElement;
29
import org.apache.cxf.aegis.type.java5.XmlElement;
29
import org.apache.cxf.aegis.type.java5.XmlReturnType;
30
import org.apache.cxf.aegis.type.java5.XmlReturnType;
30
import org.apache.cxf.annotations.WSDLDocumentation;
31
import org.apache.cxf.annotations.WSDLDocumentation;
31
 
32
 
32
/**
33
/**
33
 * Bundles various methods
34
 * Bundles various methods
34
 *
35
 *
35
 * @author Brian Rosenberger, bru@brutex.de
36
 * @author Brian Rosenberger, bru@brutex.de
36
 * @since 0.4.0
37
 * @since 0.4.0
37
 */
38
 */
38
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
39
@WebService(targetNamespace = BrutexNamespaces.WS_XSERVICES)
39
@WSDLDocumentation("Various service operations.")
40
@WSDLDocumentation("Various service operations.")
40
public interface MiscService {
41
public interface MiscService {
-
 
42
	
-
 
43
	public static final String OPERATION_GETMEMORY = "getMemory";
41
 
44
 
42
	/**
45
	/**
43
	 * Get IP address from host name.
46
	 * Get IP address from host name.
44
	 * 
47
	 * 
45
     * @param hostname
48
     * @param hostname
46
     * @return ReturnCode
49
     * @return ReturnCode
47
     */
50
     */
48
    @WebMethod(operationName = "getHostinfo")
51
    @WebMethod(operationName = "getHostinfo")
49
    @WSDLDocumentation(value = "Get information about a host.")
52
    @WSDLDocumentation(value = "Get information about a host.")
50
    public HostinfoType getHostinfo(
53
    public HostinfoType getHostinfo(
51
    		@WebParam(name = "hostname") @XmlElement(minOccurs="1", nillable=false ) String hostname);
54
    		@WebParam(name = "hostname") @XmlElement(minOccurs="1", nillable=false ) String hostname);
52
 
55
 
53
    
56
    
54
    /**
57
    /**
55
     * Delay execution for a given time.
58
     * Delay execution for a given time.
56
     * 
59
     * 
57
     * @param minutes
60
     * @param minutes
58
     * @param seconds
61
     * @param seconds
59
     * @return ReturnCode
62
     * @return ReturnCode
60
     */
63
     */
61
    @WebMethod(operationName = "sleep")
64
    @WebMethod(operationName = "sleep")
62
    @WSDLDocumentation(value = "Delay request response a specified duration.")
65
    @WSDLDocumentation(value = "Delay request response a specified duration.")
63
    public ReturnCode sleep(
66
    public ReturnCode sleep(
64
    		@WebParam(name = "minutes") int minutes,
67
    		@WebParam(name = "minutes") int minutes,
65
            @WebParam(name = "seconds") int seconds);
68
            @WebParam(name = "seconds") int seconds);
66
    
69
    
67
    
70
    
68
    /**
71
    /**
69
     * @return ReturnCode
72
     * @return ReturnCode
70
     */
73
     */
71
    @WebMethod(operationName = "getInfo")
74
    @WebMethod(operationName = "getInfo")
72
    @WSDLDocumentation(value = "Get XService information.")
75
    @WSDLDocumentation(value = "Get XService information.")
73
    public ReturnCode getInfo();
76
    public ReturnCode getInfo();
74
    
77
    
75
    /**
78
    /**
76
     * Generate a UUID
79
     * Generate a UUID
77
     * @return new UUID
80
     * @return new UUID
78
     */
81
     */
79
    @WebMethod(operationName = "generateUUID")
82
    @WebMethod(operationName = "generateUUID")
80
    @WSDLDocumentation(value = "Generate a UUID.")
83
    @WSDLDocumentation(value = "Generate a UUID.")
81
    public String generateUUID();
84
    public String generateUUID();
-
 
85
    
-
 
86
    /**
-
 
87
     * Get Memory information
-
 
88
     */
-
 
89
    @WebMethod(operationName = MiscService.OPERATION_GETMEMORY)
-
 
90
    @WSDLDocumentation(value = "Get memory and processor information")
-
 
91
    public RuntimeInfoType getMemory();
82
    
92
     
83
}
93
}