restart.xml.server
Class XMLService

java.lang.Object
  extended by restart.server.Service
      extended by restart.xml.server.XMLService

public class XMLService
extends Service

XMLService is a helper for creating XML oriented services. You're not forced to use this to create an XML oriented service, but it can be helpful.
If you do use this, then note :
- XML manipulations are done by the XMLHandler that is known by the XMLService instance.
- Input and output are provided by XMLServiceInput and XMLServiceOutput.
- For the input : use the XMLData given by the XMLServiceInput object. You can also use the other fields of the native ServiceInput object from witch XMLServiceInput is derived.
- For the output : just set the XMLData field with your XML data, then let the service do it's job (based on XMLHandler).

Author:
Thibault Ducray

Constructor Summary
XMLService(Method authMethod, java.lang.String name, XMLHandler xmlHandler)
           
XMLService(Method authMethod, java.lang.String name, XMLHandler xmlHandler, ServicePolicy policy)
           
XMLService(Method authMethod, java.lang.String name, XMLHandler xmlHandler, XMLCallback cb)
           
XMLService(Method authMethod, java.lang.String name, XMLHandler xmlHandler, XMLCallback cb, ServicePolicy policy)
           
 
Method Summary
 XMLHandler getXMLHandler()
           
 ServiceOutput invoke(ServiceInput data)
          Don't call this method yourself : it's being called by the server thread
 void setXMLHandler(XMLHandler xmlHandler)
           
 
Methods inherited from class restart.server.Service
authorizeMethod, getAuthorizedMethod, getName, getServicePolicy, setAuthorizedMethod, setCallback, setName, setServicePolicy
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLService

public XMLService(Method authMethod,
                  java.lang.String name,
                  XMLHandler xmlHandler)

XMLService

public XMLService(Method authMethod,
                  java.lang.String name,
                  XMLHandler xmlHandler,
                  XMLCallback cb,
                  ServicePolicy policy)

XMLService

public XMLService(Method authMethod,
                  java.lang.String name,
                  XMLHandler xmlHandler,
                  XMLCallback cb)

XMLService

public XMLService(Method authMethod,
                  java.lang.String name,
                  XMLHandler xmlHandler,
                  ServicePolicy policy)
Method Detail

setXMLHandler

public void setXMLHandler(XMLHandler xmlHandler)

getXMLHandler

public XMLHandler getXMLHandler()

invoke

public ServiceOutput invoke(ServiceInput data)
                     throws RestException
Description copied from class: Service
Don't call this method yourself : it's being called by the server thread

Overrides:
invoke in class Service
Throws:
RestException