public class ReactiveCamel extends Object
Constructor and Description |
---|
ReactiveCamel(org.apache.camel.CamelContext camelContext)
Wrap the CamelContext as reactive.
|
ReactiveCamel(org.apache.camel.CamelContext camelContext,
int maxWorkerPoolSize)
Wrap the CamelContext as reactive.
|
Modifier and Type | Method and Description |
---|---|
protected rx.Observable<org.apache.camel.Exchange> |
createEndpointObservable(org.apache.camel.Endpoint endpoint)
Return a newly created
Observable without conversion |
protected <T> rx.Observable<T> |
createEndpointObservable(org.apache.camel.Endpoint endpoint,
rx.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) |
rx.Observable<org.apache.camel.Exchange> |
from(org.apache.camel.Endpoint endpoint)
Convenience method for beginning the route
|
rx.Observable<org.apache.camel.Exchange> |
from(String uri)
Convenience method for beginning the route
|
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 |
CamelOperator |
to(org.apache.camel.Endpoint endpoint)
Convenience method for creating CamelOperator instances
|
CamelOperator |
to(String uri)
Convenience method for creating CamelOperator instances
|
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 |
public ReactiveCamel(org.apache.camel.CamelContext camelContext)
camelContext
- the CamelContextpublic ReactiveCamel(org.apache.camel.CamelContext camelContext, int maxWorkerPoolSize)
camelContext
- the CamelContextmaxWorkerPoolSize
- maximum number of threads in the worker pool used for reactive background taskspublic rx.Observable<org.apache.camel.Message> toObservable(String uri)
< org.apache.camel.Message >
to allow the messages sent on the endpoint
to be processed using Reactive Extensionspublic <T> rx.Observable<T> toObservable(String uri, Class<T> bodyType)
for the messages with their payload converted to the given type
to allow the messages sent on the endpoint
to be processed using Reactive Extensionspublic rx.Observable<org.apache.camel.Message> toObservable(org.apache.camel.Endpoint endpoint)
< org.apache.camel.Message >
to allow the messages sent on the endpoint
to be processed using Reactive Extensionspublic <T> rx.Observable<T> toObservable(org.apache.camel.Endpoint endpoint, Class<T> bodyType)
for the messages with their payload converted to the given type
to allow the messages sent on the endpoint
to be processed using Reactive Extensionspublic <T> void sendTo(rx.Observable<T> observable, String endpointUri)
Observable
to the given camel endpointpublic <T> void sendTo(rx.Observable<T> observable, org.apache.camel.Endpoint endpoint)
Observable
to the given camel endpointpublic rx.Observable<org.apache.camel.Exchange> from(org.apache.camel.Endpoint endpoint)
public rx.Observable<org.apache.camel.Exchange> from(String uri)
public CamelOperator to(String uri) throws Exception
Exception
public CamelOperator to(org.apache.camel.Endpoint endpoint) throws Exception
Exception
public org.apache.camel.CamelContext getCamelContext()
public org.apache.camel.Endpoint endpoint(String endpointUri)
protected <T> rx.Observable<T> createEndpointObservable(org.apache.camel.Endpoint endpoint, rx.functions.Func1<org.apache.camel.Exchange,T> converter)
Observable
given a function which converts
the Exchange
from the Camel consumer to the required typeprotected rx.Observable<org.apache.camel.Exchange> createEndpointObservable(org.apache.camel.Endpoint endpoint)
Observable
without conversionApache Camel