org.apache.camel.component.jt400
Class Jt400DataQueueConsumer
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.impl.PollingConsumerSupport<Exchange>
org.apache.camel.component.jt400.Jt400DataQueueConsumer
- All Implemented Interfaces:
- Consumer<Exchange>, PollingConsumer<Exchange>, Service
public class Jt400DataQueueConsumer
- extends PollingConsumerSupport<Exchange>
PollingConsumer that polls a data queue for data
| Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getThreadName, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
Jt400DataQueueConsumer
protected Jt400DataQueueConsumer(Jt400DataQueueEndpoint endpoint)
- Creates a new consumer instance
doStart
protected void doStart()
throws Exception
- Specified by:
doStart in class ServiceSupport
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop in class ServiceSupport
- Throws:
Exception
receive
public Exchange receive()
receive(long)
receiveNoWait
public Exchange receiveNoWait()
receive(long)
receive
public Exchange receive(long timeout)
- Receives an entry from a data queue and returns an
Exchange to
send this data If the endpoint's format is set to Jt400DataQueueEndpoint.Format.binary,
the data queue entry's data will be received/sent as a
byte[]. If the endpoint's format is set to
Jt400DataQueueEndpoint.Format.text, the data queue entry's data will be received/sent as
a String.
- Parameters:
timeout - time to wait when reading from data queue. A value of -1
indicates a blocking read.
Apache CAMEL