org.apache.camel.component.cometd
Class CometdConsumer

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultConsumer
          extended by org.apache.camel.component.cometd.CometdConsumer
All Implemented Interfaces:
CometdProducerConsumer, Consumer, Service, ShutdownableService

public class CometdConsumer
extends DefaultConsumer
implements CometdProducerConsumer

A Consumer for receiving messages using Cometd and Bayeux protocol.

Version:
$Revision: 18251 $

Nested Class Summary
static class CometdConsumer.ConsumerService
           
 
Field Summary
 
Fields inherited from class org.apache.camel.impl.DefaultConsumer
log
 
Constructor Summary
CometdConsumer(CometdEndpoint endpoint, Processor processor)
           
 
Method Summary
 CometdEndpoint getEndpoint()
          Gets the endpoint this Consumer consumes from.
 void setBayeux(org.cometd.server.AbstractBayeux bayeux)
          Sets the bayeux to use.
 void start()
          Starts the service
 void stop()
          Stops the service
 
Methods inherited from class org.apache.camel.impl.DefaultConsumer
doStart, doStop, getAsyncProcessor, getExceptionHandler, getProcessor, handleException, setExceptionHandler, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CometdConsumer

public CometdConsumer(CometdEndpoint endpoint,
                      Processor processor)
Method Detail

start

public void start()
           throws Exception
Description copied from interface: Service
Starts the service

Specified by:
start in interface Service
Overrides:
start in class ServiceSupport
Throws:
Exception - is thrown if starting failed

stop

public void stop()
          throws Exception
Description copied from interface: Service
Stops the service

Specified by:
stop in interface Service
Overrides:
stop in class ServiceSupport
Throws:
Exception - is thrown if stopping failed

setBayeux

public void setBayeux(org.cometd.server.AbstractBayeux bayeux)
Description copied from interface: CometdProducerConsumer
Sets the bayeux to use.

Specified by:
setBayeux in interface CometdProducerConsumer

getEndpoint

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

Specified by:
getEndpoint in interface CometdProducerConsumer
Specified by:
getEndpoint in interface Consumer
Overrides:
getEndpoint in class DefaultConsumer
Returns:
the endpoint


Apache CAMEL