org.mule.providers.soap.xfire
Class XFireServiceComponent

java.lang.Object
  extended byorg.mule.providers.soap.xfire.XFireServiceComponent
All Implemented Interfaces:
Callable, Disposable, Initialisable, Lifecycle, Startable, Stoppable, UMODescriptorAware, UMOEventListener

public class XFireServiceComponent
extends Object
implements Callable, Initialisable, Lifecycle, UMODescriptorAware

The Xfire service component receives requests for Xfire services it manages and marshalls requests and responses


Field Summary
protected  Log logger
          logger used by this class
protected  org.codehaus.xfire.transport.Transport transport
           
protected  String transportClass
           
protected  org.codehaus.xfire.transport.Transport universalTransport
           
protected  org.codehaus.xfire.XFire xfire
           
 
Constructor Summary
XFireServiceComponent()
           
 
Method Summary
 void dispose()
          A lifecycle method where implementor should free up any resources.
protected  void generateServicesX(OutStreamMessageAdapter response)
           
protected  void generateServiceX(OutStreamMessageAdapter response, String serviceName)
           
protected  InputStream getMessageStream(UMOEventContext context)
          Gets the stream representation of the current message.
protected  org.codehaus.xfire.service.Service getService(String name)
           
protected  String getServiceName(UMOEventContext context)
          Get the service that is mapped to the specified request.
 org.codehaus.xfire.service.ServiceRegistry getServiceRegistry()
           
protected  org.codehaus.xfire.transport.TransportManager getTransportManager()
           
 org.codehaus.xfire.XFire getXfire()
           
 void initialise()
          Method used to perform any initialisation work.
 Object onCall(UMOEventContext eventContext)
          Passes the event to the listener
 void setDescriptor(UMODescriptor descriptor)
           
 void setTransport(org.codehaus.xfire.transport.Transport transport)
           
 void setTransportClass(String clazz)
           
 void setXfire(org.codehaus.xfire.XFire xfire)
           
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected transient Log logger
logger used by this class


xfire

protected org.codehaus.xfire.XFire xfire

transport

protected org.codehaus.xfire.transport.Transport transport

universalTransport

protected org.codehaus.xfire.transport.Transport universalTransport

transportClass

protected String transportClass
Constructor Detail

XFireServiceComponent

public XFireServiceComponent()
Method Detail

setDescriptor

public void setDescriptor(UMODescriptor descriptor)
                   throws ConfigurationException
Specified by:
setDescriptor in interface UMODescriptorAware
Throws:
ConfigurationException

onCall

public Object onCall(UMOEventContext eventContext)
              throws Exception
Description copied from interface: Callable
Passes the event to the listener

Specified by:
onCall in interface Callable
Parameters:
eventContext - the context of the current event being process
Returns:
Object this object can be anything. When the UMOLifecycleAdapter for the component receives this object it will first see if the Object is an UMOMessage if not and the Object is not null a new message will be created using the returned object as the payload. This new event will then get published via the configured outbound router if-
  1. One has been configured for the UMO.
  2. the setStopFurtherProcessing(true) wasn't called on the event context event.
Throws:
Exception - if the event fails to process properly. If exceptions aren't handled by the implementation they will be handled by the exceptionListener associated with the component

start

public void start()
           throws UMOException
Specified by:
start in interface Startable
Throws:
UMOException

stop

public void stop()
          throws UMOException
Specified by:
stop in interface Stoppable
Throws:
UMOException

initialise

public void initialise()
                throws InitialisationException
Description copied from interface: Initialisable
Method used to perform any initialisation work. If a fatal error occurs during initialisation an InitialisationException should be thrown, causing the Mule instance to shutdown. If the error is recoverable, say by retrying to connect, a RecoverableException should be thrown. There is no guarantee that by throwing a Recoverable exception that the Mule instance will not shut down.

Specified by:
initialise in interface Initialisable
Throws:
InitialisationException - if a fatal error occurs causing the Mule instance to shutdown

dispose

public void dispose()
Description copied from interface: Disposable
A lifecycle method where implementor should free up any resources. If an exception is thrown it should just be logged and processing should continue. This method should not throw Runtime exceptions.

Specified by:
dispose in interface Disposable

getTransportManager

protected org.codehaus.xfire.transport.TransportManager getTransportManager()

generateServiceX

protected void generateServiceX(OutStreamMessageAdapter response,
                                String serviceName)
                         throws IOException,
                                javax.xml.stream.XMLStreamException
Throws:
IOException
javax.xml.stream.XMLStreamException

generateServicesX

protected void generateServicesX(OutStreamMessageAdapter response)
                          throws IOException,
                                 javax.xml.stream.XMLStreamException
Parameters:
response -
Throws:
IOException
javax.xml.stream.XMLStreamException

getMessageStream

protected InputStream getMessageStream(UMOEventContext context)
                                throws UMOException
Gets the stream representation of the current message. If the message is set for streaming the input stream on the UMOStreamMEssageAdapter will be used, otherwise a byteArrayInputStream will be used to hold the byte[] representation of the current message.

Parameters:
context - the event context
Returns:
The inputstream for the current message
Throws:
UMOException

getServiceName

protected String getServiceName(UMOEventContext context)
Get the service that is mapped to the specified request.

Parameters:
context - the context from which to find the service name
Returns:
the service that is mapped to the specified request.

getService

protected org.codehaus.xfire.service.Service getService(String name)

getXfire

public org.codehaus.xfire.XFire getXfire()

setXfire

public void setXfire(org.codehaus.xfire.XFire xfire)

setTransport

public void setTransport(org.codehaus.xfire.transport.Transport transport)

setTransportClass

public void setTransportClass(String clazz)

getServiceRegistry

public org.codehaus.xfire.service.ServiceRegistry getServiceRegistry()


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.