|
|||||||||||
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 AtomicBoolean |
connecting
|
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 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 AtomicBoolean disposing
protected final WaitableBoolean connected
protected final WaitableBoolean stopped
protected final 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 UMOMessageReceiver
public void handleException(Exception exception)
protected void setExceptionDetails(UMOMessage message, Throwable exception)
message
- exception
- public UMOConnector getConnector()
getConnector
in interface UMOMessageReceiver
public void setConnector(UMOConnector connector)
setConnector
in interface UMOMessageReceiver
public UMOComponent getComponent()
getComponent
in interface UMOMessageReceiver
public final UMOMessage routeMessage(UMOMessage message) throws UMOException
routeMessage
in interface UMOMessageReceiver
UMOException
public final UMOMessage routeMessage(UMOMessage message, boolean synchronous) throws UMOException
routeMessage
in interface UMOMessageReceiver
UMOException
public final UMOMessage routeMessage(UMOMessage message, UMOTransaction trans, boolean synchronous) throws UMOException
routeMessage
in interface UMOMessageReceiver
UMOException
public final UMOMessage routeMessage(UMOMessage message, OutputStream outputStream) throws UMOException
routeMessage
in interface UMOMessageReceiver
UMOException
public final UMOMessage routeMessage(UMOMessage message, boolean synchronous, OutputStream outputStream) throws UMOException
routeMessage
in interface UMOMessageReceiver
UMOException
public final UMOMessage routeMessage(UMOMessage message, UMOTransaction trans, boolean synchronous, OutputStream outputStream) throws UMOException
routeMessage
in interface UMOMessageReceiver
UMOException
protected UMOMessage handleUnacceptedFilter(UMOMessage message)
public void setEndpoint(UMOEndpoint endpoint)
setEndpoint
in interface UMOMessageReceiver
endpoint
- the endpoint to listen onUMOEndpoint
public void setComponent(UMOComponent component)
setComponent
in interface UMOMessageReceiver
component
- 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 Disposable
public UMOEndpointURI getEndpointURI()
UMOMessageReceiver
getEndpointURI
in interface UMOMessageReceiver
protected UMOWorkManager getWorkManager()
protected void setWorkManager(UMOWorkManager workManager)
public void connect() throws Exception
UMOConnectable
connect
in interface UMOConnectable
Exception
public void disconnect() throws Exception
UMOConnectable
disconnect
in interface UMOConnectable
Exception
public String getConnectionDescription()
UMOConnectable
getConnectionDescription
in interface UMOConnectable
public final void start() throws UMOException
start
in interface Startable
UMOException
public final void stop()
stop
in interface Stoppable
public final boolean isConnected()
UMOConnectable
isConnected
in interface UMOConnectable
public InternalMessageListener getListener()
public void setListener(InternalMessageListener listener)
protected String getConnectEventId()
protected UMOMessage applyResponseTransformer(UMOMessage returnMessage) throws TransformerException
TransformerException
public void setReceiverKey(String receiverKey)
setReceiverKey
in interface UMOMessageReceiver
public String getReceiverKey()
getReceiverKey
in interface UMOMessageReceiver
public 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
Exception
protected abstract void doDispose()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |