org.apache.camel.impl
Class PollingConsumerSupport

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.PollingConsumerSupport
All Implemented Interfaces:
Consumer, PollingConsumer, Service, ShutdownableService, StatefulService, SuspendableService
Direct Known Subclasses:
EventDrivenPollingConsumer, ProcessorPollingConsumer

public abstract class PollingConsumerSupport
extends ServiceSupport
implements PollingConsumer

A useful base class for implementations of PollingConsumer

Version:

Field Summary
protected  org.slf4j.Logger log
           
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
PollingConsumerSupport(Endpoint endpoint)
           
 
Method Summary
 Endpoint getEndpoint()
          Gets the endpoint this Consumer consumes from.
 ExceptionHandler getExceptionHandler()
           
protected  void handleException(Throwable t)
          Handles the given exception using the getExceptionHandler()
 void setExceptionHandler(ExceptionHandler exceptionHandler)
           
 String toString()
           
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doStart, doStop, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, 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.PollingConsumer
receive, receive, receiveNoWait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Field Detail

log

protected final transient org.slf4j.Logger log
Constructor Detail

PollingConsumerSupport

public PollingConsumerSupport(Endpoint endpoint)
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getEndpoint

public Endpoint getEndpoint()
Description copied from interface: Consumer
Gets the endpoint this Consumer consumes from.

Specified by:
getEndpoint in interface Consumer
Returns:
the endpoint

getExceptionHandler

public ExceptionHandler getExceptionHandler()

setExceptionHandler

public void setExceptionHandler(ExceptionHandler exceptionHandler)

handleException

protected void handleException(Throwable t)
Handles the given exception using the getExceptionHandler()

Parameters:
t - the exception to handle


Apache CAMEL