org.apache.camel.rx
Class ReactiveCamel

java.lang.Object
  extended by org.apache.camel.rx.ReactiveCamel

public class ReactiveCamel
extends Object

Provides the Reactive Extensions support for Camel via the RxJava library


Constructor Summary
ReactiveCamel(org.apache.camel.CamelContext camelContext)
           
 
Method Summary
protected
<T> rx.Observable<T>
createEndpointObservable(org.apache.camel.Endpoint endpoint, rx.util.functions.Func1<org.apache.camel.Exchange,T> converter)
          Returns a newly created Observable given a function which converts the Exchange from the Camel consumer to the required type
 org.apache.camel.Endpoint endpoint(String endpointUri)
           
 org.apache.camel.CamelContext getCamelContext()
           
<T> void
sendTo(rx.Observable<T> observable, org.apache.camel.Endpoint endpoint)
          Sends events on the given Observable to the given camel endpoint
<T> void
sendTo(rx.Observable<T> observable, String endpointUri)
          Sends events on the given Observable to the given camel endpoint
 rx.Observable<org.apache.camel.Message> toObservable(org.apache.camel.Endpoint endpoint)
          Returns an < org.apache.camel.Message > to allow the messages sent on the endpoint to be processed using Reactive Extensions
<T> rx.Observable<T>
toObservable(org.apache.camel.Endpoint endpoint, Class<T> bodyType)
          Returns an for the messages with their payload converted to the given type to allow the messages sent on the endpoint to be processed using Reactive Extensions
 rx.Observable<org.apache.camel.Message> toObservable(String uri)
          Returns an < org.apache.camel.Message > to allow the messages sent on the endpoint to be processed using Reactive Extensions
<T> rx.Observable<T>
toObservable(String uri, Class<T> bodyType)
          Returns an for the messages with their payload converted to the given type to allow the messages sent on the endpoint to be processed using Reactive Extensions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReactiveCamel

public ReactiveCamel(org.apache.camel.CamelContext camelContext)
Method Detail

toObservable

public rx.Observable<org.apache.camel.Message> toObservable(String uri)
Returns an < org.apache.camel.Message > to allow the messages sent on the endpoint to be processed using Reactive Extensions


toObservable

public <T> rx.Observable<T> toObservable(String uri,
                                         Class<T> bodyType)
Returns an for the messages with their payload converted to the given type to allow the messages sent on the endpoint to be processed using Reactive Extensions


toObservable

public rx.Observable<org.apache.camel.Message> toObservable(org.apache.camel.Endpoint endpoint)
Returns an < org.apache.camel.Message > to allow the messages sent on the endpoint to be processed using Reactive Extensions


toObservable

public <T> rx.Observable<T> toObservable(org.apache.camel.Endpoint endpoint,
                                         Class<T> bodyType)
Returns an for the messages with their payload converted to the given type to allow the messages sent on the endpoint to be processed using Reactive Extensions


sendTo

public <T> void sendTo(rx.Observable<T> observable,
                       String endpointUri)
Sends events on the given Observable to the given camel endpoint


sendTo

public <T> void sendTo(rx.Observable<T> observable,
                       org.apache.camel.Endpoint endpoint)
Sends events on the given Observable to the given camel endpoint


getCamelContext

public org.apache.camel.CamelContext getCamelContext()

endpoint

public org.apache.camel.Endpoint endpoint(String endpointUri)

createEndpointObservable

protected <T> rx.Observable<T> createEndpointObservable(org.apache.camel.Endpoint endpoint,
                                                        rx.util.functions.Func1<org.apache.camel.Exchange,T> converter)
Returns a newly created Observable given a function which converts the Exchange from the Camel consumer to the required type



Apache Camel