|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.mule.providers.AbstractMessageReceiver
AbstractMessageReceiver provides common methods for all Message
Receivers provided with Mule. A message receiver enables an endpoint to receive a
message from an external system.
| Field Summary | |
protected UMOComponent |
component
The Component with which this receiver is associated with |
protected WaitableBoolean |
connected
|
protected ConnectionStrategy |
connectionStrategy
|
protected AbstractConnector |
connector
the connector associated with this receiver |
protected AtomicBoolean |
disposing
|
protected UMOEndpoint |
endpoint
The endpoint descriptor which is associated with this receiver |
protected Log |
logger
logger used by this class |
protected WaitableBoolean |
stopped
|
| Constructor Summary | |
AbstractMessageReceiver(UMOConnector connector,
UMOComponent component,
UMOEndpoint endpoint)
Creates the Message Receiver |
|
| Method Summary | |
protected UMOMessage |
applyResponseTransformer(UMOMessage returnMessage)
|
void |
connect()
Make the connection to the underlying transport. |
void |
disconnect()
Disconnect the from the underlying transport |
void |
dispose()
A lifecycle method where implementor should free up any resources. |
abstract void |
doConnect()
|
abstract void |
doDisconnect()
|
protected void |
doDispose()
Template method to dispose any resources associated with this receiver. |
void |
doStart()
|
void |
doStop()
|
UMOComponent |
getComponent()
|
protected String |
getConnectEventId()
|
String |
getConnectionDescription()
Returns a string identifying the underlying resource |
UMOConnector |
getConnector()
|
UMOEndpoint |
getEndpoint()
|
UMOEndpointURI |
getEndpointURI()
The endpointUri that this receiver listens on |
InternalMessageListener |
getListener()
|
protected UMOWorkManager |
getWorkManager()
|
void |
handleException(Exception exception)
|
protected UMOMessage |
handleUnacceptedFilter(UMOMessage message)
|
boolean |
isConnected()
Determines if this object is connected or not |
UMOMessage |
routeMessage(UMOMessage message)
|
UMOMessage |
routeMessage(UMOMessage message,
boolean synchronous)
|
UMOMessage |
routeMessage(UMOMessage message,
boolean synchronous,
OutputStream outputStream)
|
UMOMessage |
routeMessage(UMOMessage message,
OutputStream outputStream)
|
UMOMessage |
routeMessage(UMOMessage message,
UMOTransaction trans,
boolean synchronous)
|
UMOMessage |
routeMessage(UMOMessage message,
UMOTransaction trans,
boolean synchronous,
OutputStream outputStream)
|
void |
setComponent(UMOComponent component)
|
void |
setConnector(UMOConnector connector)
|
void |
setEndpoint(UMOEndpoint endpoint)
|
protected void |
setExceptionDetails(UMOMessage message,
Throwable exception)
This method is used to set any additional aand possibly transport specific information on the return message where it has an exception payload. |
void |
setListener(InternalMessageListener listener)
|
protected void |
setWorkManager(UMOWorkManager workManager)
|
void |
start()
|
void |
stop()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected transient Log logger
protected UMOComponent component
protected UMOEndpoint endpoint
protected AbstractConnector connector
protected AtomicBoolean disposing
protected WaitableBoolean connected
protected WaitableBoolean stopped
protected ConnectionStrategy connectionStrategy
| Constructor Detail |
public AbstractMessageReceiver(UMOConnector connector,
UMOComponent component,
UMOEndpoint endpoint)
throws InitialisationException
connector - the endpoint that created this listenercomponent - the component to associate with the receiver. When data is
received the component dispatchEvent or
sendEvent is used to dispatch the data to the
relivant UMO.endpoint - the provider contains the endpointUri on which the receiver
will listen on. The endpointUri can be anything and is specific to
the receiver implementation i.e. an email address, a directory, a
jms destination or port address.UMOComponent,
UMOEndpoint| Method Detail |
public UMOEndpoint getEndpoint()
getEndpoint in interface UMOMessageReceiverpublic void handleException(Exception exception)
protected void setExceptionDetails(UMOMessage message,
Throwable exception)
message - exception - public UMOConnector getConnector()
getConnector in interface UMOMessageReceiverpublic void setConnector(UMOConnector connector)
setConnector in interface UMOMessageReceiverpublic UMOComponent getComponent()
getComponent in interface UMOMessageReceiver
public final UMOMessage routeMessage(UMOMessage message)
throws UMOException
UMOException
public final UMOMessage routeMessage(UMOMessage message,
boolean synchronous)
throws UMOException
UMOException
public final UMOMessage routeMessage(UMOMessage message,
UMOTransaction trans,
boolean synchronous)
throws UMOException
UMOException
public final UMOMessage routeMessage(UMOMessage message,
OutputStream outputStream)
throws UMOException
UMOException
public final UMOMessage routeMessage(UMOMessage message,
boolean synchronous,
OutputStream outputStream)
throws UMOException
UMOException
public final UMOMessage routeMessage(UMOMessage message,
UMOTransaction trans,
boolean synchronous,
OutputStream outputStream)
throws UMOException
UMOExceptionprotected UMOMessage handleUnacceptedFilter(UMOMessage message)
public void setEndpoint(UMOEndpoint endpoint)
setEndpoint in interface UMOMessageReceiverendpoint - the endpoint to listen onUMOEndpointpublic void setComponent(UMOComponent component)
setComponent in interface UMOMessageReceivercomponent - the component to associate with the receiver. When data is
received the component dispatchEvent or
sendEvent is used to dispatch the data to the
relivant UMO.public final void dispose()
Disposable
dispose in interface Disposableprotected void doDispose()
public UMOEndpointURI getEndpointURI()
UMOMessageReceiver
getEndpointURI in interface UMOMessageReceiverprotected UMOWorkManager getWorkManager()
protected void setWorkManager(UMOWorkManager workManager)
public void connect()
throws Exception
UMOConnectable
connect in interface UMOConnectableException
public void disconnect()
throws Exception
UMOConnectable
disconnect in interface UMOConnectableExceptionpublic String getConnectionDescription()
UMOConnectable
getConnectionDescription in interface UMOConnectable
public final void start()
throws UMOException
start in interface StartableUMOExceptionpublic final void stop()
stop in interface Stoppablepublic final boolean isConnected()
UMOConnectable
isConnected in interface UMOConnectablepublic InternalMessageListener getListener()
public void setListener(InternalMessageListener listener)
protected String getConnectEventId()
protected UMOMessage applyResponseTransformer(UMOMessage returnMessage)
throws TransformerException
TransformerException
public void doStart()
throws UMOException
UMOException
public void doStop()
throws UMOException
UMOException
public abstract void doConnect()
throws Exception
Exception
public abstract void doDisconnect()
throws Exception
Exception
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||