org.apache.camel.rx.support
Class ObservableProcessor<T>

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.rx.support.ObservableProcessor<T>
All Implemented Interfaces:
org.apache.camel.Processor, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.StatefulService, org.apache.camel.SuspendableService
Direct Known Subclasses:
ObservableBody, ObservableMessage

public abstract class ObservableProcessor<T>
extends org.apache.camel.support.ServiceSupport
implements org.apache.camel.Processor

A base class for implementing a Processor which provides access to an Observable so that the messages can be processed using the RX Java API


Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
protected ObservableProcessor(rx.util.functions.Func1<org.apache.camel.Exchange,T> func)
           
 
Method Summary
protected abstract  void configure(rx.Observable<T> observable)
          Provides the configuration hook so that derived classes can process the observable to use whatever RX methods they wish to process the incoming events
protected  void doStart()
           
protected  void doStop()
           
 rx.Observable<T> getObservable()
          Returns the Observable for this Processor so that the messages that are received can be processed using the RX Java API
 void process(org.apache.camel.Exchange exchange)
           
 
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, toString, wait, wait, wait
 

Constructor Detail

ObservableProcessor

protected ObservableProcessor(rx.util.functions.Func1<org.apache.camel.Exchange,T> func)
Method Detail

process

public void process(org.apache.camel.Exchange exchange)
             throws Exception
Specified by:
process in interface org.apache.camel.Processor
Throws:
Exception

getObservable

public rx.Observable<T> getObservable()
Returns the Observable for this Processor so that the messages that are received can be processed using the RX Java API


configure

protected abstract void configure(rx.Observable<T> observable)
Provides the configuration hook so that derived classes can process the observable to use whatever RX methods they wish to process the incoming events


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


Apache Camel