CxfServiceComponent (Mule ESB 2.2.1 API)
Keywords: org.mule.transport.cxf.CxfServiceComponent class

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Field Summary
`protected org.apache.cxf.Bus` | `bus`
`protected Log` | `logger` logger used by this class
`protected String` | `transportClass`

Fields inherited from interface org.mule.api.lifecycle.Initialisable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Startable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Stoppable
`PHASE_NAME`

Fields inherited from interface org.mule.api.lifecycle.Disposable
`PHASE_NAME`

Constructor Summary
`CxfServiceComponent(CxfConnector connector, CxfMessageReceiver receiver)`

Method Summary
`void` | `dispose()` A lifecycle method where implementor should free up any resources.
`protected Object` | `generateWSDLOrXSD(MuleEventContext eventContext, String req)`
`org.apache.cxf.Bus` | `getBus()`
`protected InputStream` | `getMessageStream(MuleEventContext context)` Gets the stream representation of the current message.
`protected String` | `getSoapAction(MuleMessage message)`
`void` | `initialise()` Method used to perform any initialisation work.
`Object` | `onCall(MuleEventContext eventContext)` Passes the event to the listener
`protected Object` | `sendToDestination(MuleEventContext ctx)`
`void` | `setBus(org.apache.cxf.Bus bus)`
`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

### bus

    protected org.apache.cxf.Bus bus

### transportClass

    protected String transportClass

Constructor Detail

### CxfServiceComponent

    public CxfServiceComponent(CxfConnector connector,
                               CxfMessageReceiver receiver)
                        throws ConfigurationException

Throws:
  `ConfigurationException`

Method Detail

### 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-
    1. One has been configured for the component.
    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 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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