org.mule.providers
Class AbstractReceiverResourceWorker
java.lang.Object
org.mule.providers.AbstractReceiverWorker
org.mule.providers.AbstractReceiverResourceWorker
- All Implemented Interfaces:
- Runnable, javax.resource.spi.work.Work
- Direct Known Subclasses:
- TcpMessageReceiver.TcpWorker
public abstract class AbstractReceiverResourceWorker
- extends AbstractReceiverWorker
This is a Message receiver worker used by transports that do not have a way for the underlying transport
to call back to the receiver when a message is available such as Jms. This worker provides a
callback getNextMessage(Object)
where the receiver can read the next message from the underlying
transport.
Method Summary |
void |
doRun()
(non-Javadoc) |
protected abstract Object |
getNextMessage(Object resource)
The method used to read the next message from the underlying transport. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
resource
protected Object resource
AbstractReceiverResourceWorker
public AbstractReceiverResourceWorker(Object resource,
AbstractMessageReceiver receiver)
AbstractReceiverResourceWorker
public AbstractReceiverResourceWorker(Object resource,
AbstractMessageReceiver receiver,
OutputStream out)
doRun
public void doRun()
- (non-Javadoc)
- Overrides:
doRun
in class AbstractReceiverWorker
getNextMessage
protected abstract Object getNextMessage(Object resource)
throws Exception
- The method used to read the next message from the underlying transport.
- Parameters:
resource
- the resource to read from, this may be a socket, a directory or some higher level
representation.
- Returns:
- the message read from the resource. This can be raw data such as a byte[] or a UMOMessageAdapter.
- Throws:
Exception
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.