|
|||||||||||
| 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 edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
connecting
|
protected ConnectionStrategy |
connectionStrategy
|
protected AbstractConnector |
connector
the connector associated with this receiver |
protected edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean |
disposing
|
protected UMOEndpoint |
endpoint
The endpoint descriptor which is associated with this receiver |
protected Log |
logger
logger used by this class |
protected String |
receiverKey
Stores the key to this receiver, as used by the Connector to store the receiver. |
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. |
protected abstract void |
doConnect()
|
protected abstract void |
doDisconnect()
|
protected abstract void |
doDispose()
|
protected abstract void |
doStart()
|
protected abstract 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()
|
String |
getReceiverKey()
|
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)
|
void |
setReceiverKey(String receiverKey)
|
protected void |
setWorkManager(UMOWorkManager workManager)
|
void |
start()
|
void |
stop()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected final Log logger
protected UMOComponent component
protected UMOEndpoint endpoint
protected AbstractConnector connector
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean disposing
protected final WaitableBoolean connected
protected final WaitableBoolean stopped
protected final edu.emory.mathcs.backport.java.util.concurrent.atomic.AtomicBoolean connecting
protected String receiverKey
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
routeMessage in interface UMOMessageReceiverUMOException
public final UMOMessage routeMessage(UMOMessage message,
boolean synchronous)
throws UMOException
routeMessage in interface UMOMessageReceiverUMOException
public final UMOMessage routeMessage(UMOMessage message,
UMOTransaction trans,
boolean synchronous)
throws UMOException
routeMessage in interface UMOMessageReceiverUMOException
public final UMOMessage routeMessage(UMOMessage message,
OutputStream outputStream)
throws UMOException
routeMessage in interface UMOMessageReceiverUMOException
public final UMOMessage routeMessage(UMOMessage message,
boolean synchronous,
OutputStream outputStream)
throws UMOException
routeMessage in interface UMOMessageReceiverUMOException
public final UMOMessage routeMessage(UMOMessage message,
UMOTransaction trans,
boolean synchronous,
OutputStream outputStream)
throws UMOException
routeMessage in interface UMOMessageReceiverUMOExceptionprotected 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 Disposablepublic 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
TransformerExceptionpublic void setReceiverKey(String receiverKey)
setReceiverKey in interface UMOMessageReceiverpublic String getReceiverKey()
getReceiverKey in interface UMOMessageReceiverpublic String toString()
protected abstract void doStart()
throws UMOException
UMOException
protected abstract void doStop()
throws UMOException
UMOException
protected abstract void doConnect()
throws Exception
Exception
protected abstract void doDisconnect()
throws Exception
Exceptionprotected abstract void doDispose()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||