org.apache.camel.component.jt400
Class Jt400DataQueueConsumer

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.PollingConsumerSupport
          extended by org.apache.camel.component.jt400.Jt400DataQueueConsumer
All Implemented Interfaces:
org.apache.camel.Consumer, org.apache.camel.PollingConsumer, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService

public class Jt400DataQueueConsumer
extends org.apache.camel.impl.PollingConsumerSupport

PollingConsumer that polls a data queue for data


Field Summary
 
Fields inherited from class org.apache.camel.impl.PollingConsumerSupport
log
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
protected Jt400DataQueueConsumer(Jt400DataQueueEndpoint endpoint)
          Creates a new consumer instance
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
 org.apache.camel.Exchange receive()
           
 org.apache.camel.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[].
 org.apache.camel.Exchange receiveNoWait()
           
 
Methods inherited from class org.apache.camel.impl.PollingConsumerSupport
getEndpoint, getExceptionHandler, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

Jt400DataQueueConsumer

protected Jt400DataQueueConsumer(Jt400DataQueueEndpoint endpoint)
Creates a new consumer instance

Method Detail

doStart

protected void doStart()
                throws Exception
Specified by:
doStart in class org.apache.camel.support.ServiceSupport
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Specified by:
doStop in class org.apache.camel.support.ServiceSupport
Throws:
Exception

receive

public org.apache.camel.Exchange receive()

receiveNoWait

public org.apache.camel.Exchange receiveNoWait()

receive

public org.apache.camel.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.

The following message headers may be set by the receiver

Parameters:
timeout - time to wait when reading from data queue. A value of -1 indicates a blocking read.


Apache Camel