org.mule.transport.cxf
Class CxfServiceComponent
java.lang.Object
org.mule.transport.cxf.CxfServiceComponent
- All Implemented Interfaces:
- Callable, Disposable, EventListener, Initialisable, Lifecycle, Startable, Stoppable
public class CxfServiceComponent
- extends Object
- implements Callable, Lifecycle
The CXF receives messages from Mule, converts them into CXF messages and dispatches
them into the receiving CXF destination.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected transient Log logger
- logger used by this class
bus
protected org.apache.cxf.Bus bus
transportClass
protected String transportClass
CxfServiceComponent
public CxfServiceComponent(CxfConnector connector,
CxfMessageReceiver receiver)
throws ConfigurationException
- Throws:
ConfigurationException
onCall
public Object onCall(MuleEventContext 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
LifecycleAdapter
for the service receives this
object it will first see if the Object is an MuleMessage
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-
- One has been configured for the component.
- 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 service
generateWSDLOrXSD
protected Object generateWSDLOrXSD(MuleEventContext eventContext,
String req)
throws EndpointNotFoundException,
IOException
- Throws:
EndpointNotFoundException
IOException
sendToDestination
protected Object sendToDestination(MuleEventContext ctx)
throws MuleException,
IOException
- Throws:
MuleException
IOException
getMessageStream
protected InputStream getMessageStream(MuleEventContext context)
throws MuleException
- Gets the stream representation of the current message.
- Parameters:
context
- the event context
- Returns:
- The inputstream for the current message
- Throws:
MuleException
getSoapAction
protected String getSoapAction(MuleMessage message)
getBus
public org.apache.cxf.Bus getBus()
setBus
public void setBus(org.apache.cxf.Bus bus)
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
RecoverableException
- if an error occurs that can be recovered from
start
public void start()
throws MuleException
- Specified by:
start
in interface Startable
- Throws:
MuleException
stop
public void stop()
throws MuleException
- Specified by:
stop
in interface Stoppable
- Throws:
MuleException
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
Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.