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
Class AbstractMessageRequester

    java.lang.Object
      org.mule.transport.AbstractTransportMessageHandler
          org.mule.transport.AbstractMessageRequester

All Implemented Interfaces:
  Disposable, Initialisable, Lifecycle, LifecycleStateEnabled, Startable, Stoppable, Connectable, MessageRequester, MessageRequesting

Direct Known Subclasses:
  AxisMessageRequester, FileMessageRequester, FtpMessageRequester, HttpClientMessageRequester, JdbcMessageRequester, JmsMessageRequester, RetrieveMessageRequester, TcpMessageRequester, UdpMessageRequester, UnsupportedMessageRequester, VMMessageRequester, XmppMessageRequester

    public abstract class AbstractMessageRequester

extends AbstractTransportMessageHandler
implements MessageRequester

The Message Requester is used to explicitly request messages from a message channel or resource rather than subscribing to inbound events or polling for messages. This is often used programatically but will not be used for inbound endpoints configured on services.

Field Summary

Fields inherited from class org.mule.transport.AbstractTransportMessageHandler
`connected, connecting, connector, endpoint, lifecycleManager, logger, muleMessageFactory, retryTemplate, startOnConnect`

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`

Fields inherited from interface org.mule.api.transport.MessageRequesting
`REQUEST_NO_WAIT, REQUEST_WAIT_INDEFINITELY`

Constructor Summary
`AbstractMessageRequester(InboundEndpoint endpoint)`

Method Summary
`protected void` | `applyInboundTransformers(MuleMessage message)`
`protected ConnectableLifecycleManager` | `createLifecycleManager()`
`protected abstract MuleMessage` | `doRequest(long timeout)` Make a specific request to the underlying transport
`InboundEndpoint` | `getEndpoint()`
`protected String` | `getRequesterName()`
`protected WorkManager` | `getWorkManager()`
`void` | `initialise()` Method used to perform any initialisation work.
`MuleMessage` | `request(long timeout)` Make a specific request to the underlying transport

Methods inherited from class org.mule.transport.AbstractTransportMessageHandler
`activate, callDoStartWhenItIsConnected, connect, connectAndThenStart, createMuleMessage, createMuleMessage, createMuleMessage, createMuleMessageFactory, createNullMuleMessage, disconnect, dispose, disposeAndLogException, doConnect, doDisconnect, doDispose, doInitialise, doStart, doStop, getConnectEventId, getConnectionDescription, getConnector, getLifecycleState, initializeMessageFactory, initializeRetryPolicy, isConnected, isConnecting, isDoStartMustFollowDoConnect, isDoThreading, isStarted, passivate, setEndpoint, start, stop, toString, validate, validateConnection`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface org.mule.api.transport.MessageRequester
`activate, createMuleMessage, createMuleMessage, getConnector, passivate, validate`

Methods inherited from interface org.mule.api.transport.Connectable
`connect, disconnect, getConnectionDescription, isConnected, validateConnection`

Methods inherited from interface org.mule.api.lifecycle.Startable
`start`

Methods inherited from interface org.mule.api.lifecycle.Stoppable
`stop`

Methods inherited from interface org.mule.api.lifecycle.Disposable
`dispose`

Methods inherited from interface org.mule.api.lifecycle.LifecycleStateEnabled
`getLifecycleState`

Constructor Detail

### AbstractMessageRequester

    public AbstractMessageRequester(InboundEndpoint endpoint)

Method Detail

### createLifecycleManager

    protected ConnectableLifecycleManager createLifecycleManager()

  Specified by:
    `createLifecycleManager` in class `AbstractTransportMessageHandler`

### initialise

    public final void initialise()
                          throws InitialisationException

  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`
  Overrides:
    `initialise` in class `AbstractTransportMessageHandler`
  Throws:
    `InitialisationException` - if a fatal error occurs causing the Mule instance to shutdown
    `RecoverableException` - if an error occurs that can be recovered from

### getRequesterName

    protected String getRequesterName()

### request

    public final MuleMessage request(long timeout)
                              throws Exception

  Make a specific request to the underlying transport

  Specified by:
    `request` in interface `MessageRequesting`
  Parameters:
    `timeout` - the maximum time the operation should block before returning. The call should return immediately if there is data available. If no data becomes available before the timeout elapses, null will be returned
  Returns:
    the result of the request wrapped in a MuleMessage object. Null will be returned if no data was available
  Throws:
    `Exception` - if the call to the underlying protocol causes an exception

### applyInboundTransformers

    protected void applyInboundTransformers(MuleMessage message)
                                     throws MuleException

  Throws:
    `MuleException`

### getWorkManager

    protected WorkManager getWorkManager()
                                  throws MuleException

  Specified by:
    `getWorkManager` in class `AbstractTransportMessageHandler`
  Throws:
    `MuleException`

### getEndpoint

    public InboundEndpoint getEndpoint()

  Specified by:
    `getEndpoint` in interface `MessageRequester`
  Overrides:
    `getEndpoint` in class `AbstractTransportMessageHandler`
  Returns:
    the endpoint used for requesting events

### doRequest

    protected abstract MuleMessage doRequest(long timeout)
                                      throws Exception

  Make a specific request to the underlying transport

  Parameters:
    `timeout` - the maximum time the operation should block before returning. The call should return immediately if there is data available. If no data becomes available before the timeout elapses, null will be returned
  Returns:
    the result of the request wrapped in a MuleMessage object. Null will be returned if no data was avaialable
  Throws:
    `Exception` - if the call to the underlying protocal cuases an exception

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-2010 MuleSoft, Inc.. All Rights Reserved.