AbstractReceiverResourceWorker (Mule ESB 2.2.1 API)
Keywords: org.mule.transport.AbstractReceiverResourceWorker class

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 AbstractReceiverResourceWorker

    java.lang.Object
      org.mule.transport.AbstractReceiverWorker
          org.mule.transport.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.

Field Summary
`protected Object` | `resource`

Fields inherited from class org.mule.transport.AbstractReceiverWorker
`endpoint, messages, out, receiver`

Constructor Summary
`AbstractReceiverResourceWorker(Object resource, AbstractMessageReceiver receiver)`
`AbstractReceiverResourceWorker(Object resource, AbstractMessageReceiver receiver, OutputStream out)`

Method Summary
`void` | `doRun()` (non-Javadoc)
`protected abstract Object` | `getNextMessage(Object resource)` The method used to read the next message from the underlying transport.
`protected boolean` | `hasMoreMessages(Object message)`

Methods inherited from class org.mule.transport.AbstractReceiverWorker
`bindTransaction, handleException, handleResults, postProcessMessage, preProcessMessage, preRouteMuleMessage, release, run`

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

Field Detail

### resource

    protected Object resource

Constructor Detail

### AbstractReceiverResourceWorker

    public AbstractReceiverResourceWorker(Object resource,
                                          AbstractMessageReceiver receiver)

### AbstractReceiverResourceWorker

    public AbstractReceiverResourceWorker(Object resource,
                                          AbstractMessageReceiver receiver,
                                          OutputStream out)

Method Detail

### doRun

    public void doRun()

  (non-Javadoc)

  Overrides:
    `doRun` in class `AbstractReceiverWorker`

### hasMoreMessages

    protected boolean hasMoreMessages(Object message)

### 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 MessageAdapter.
  Throws:
    `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-2009 MuleSource, Inc.. All Rights Reserved.