Subversion Repositories XServices

Rev

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

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