public class CamelStreamer<K,V> extends StreamAdapter<org.apache.camel.Exchange,K,V> implements org.apache.camel.Processor
endpointUri and the appropriate stream tuple extractor (either StreamSingleTupleExtractor or StreamMultipleTupleExtractor.
The user can also provide a custom CamelContext in case they want to attach custom components, a PropertiesComponent, set tracers, management strategies, etc.| Constructor and Description |
|---|
CamelStreamer() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.camel.CamelContext |
getCamelContext()
Gets the underlying
CamelContext, whether created automatically by Ignite or the context specified by the
user. |
String |
getEndpointUri()
Gets the endpoint URI from which to consume.
|
org.apache.camel.Processor |
getResponseProcessor()
Gets the
Processor used to generate the response. |
void |
process(org.apache.camel.Exchange exchange)
Processes the incoming
Exchange and adds the tuple(s) to the underlying streamer. |
void |
setCamelContext(org.apache.camel.CamelContext camelCtx)
Explicitly sets the
CamelContext to use. |
void |
setEndpointUri(String endpointUri)
Sets the endpoint URI from which to consume.
|
void |
setResponseProcessor(org.apache.camel.Processor resProc)
Sets the
Processor used to generate the response. |
void |
start()
Starts the streamer.
|
void |
stop()
Stops the streamer.
|
addMessage, getIgnite, getMultipleTupleExtractor, getSingleTupleExtractor, getStreamer, getTupleExtractor, setIgnite, setMultipleTupleExtractor, setSingleTupleExtractor, setStreamer, setTupleExtractorpublic void start()
throws IgniteException
IgniteException - In cases when failed to start the streamer.public void stop()
throws IgniteException
IgniteException - In cases if failed to stop the streamer.public void process(org.apache.camel.Exchange exchange)
throws Exception
Exchange and adds the tuple(s) to the underlying streamer.process in interface org.apache.camel.Processorexchange - The Camel Exchange.Exceptionpublic org.apache.camel.CamelContext getCamelContext()
CamelContext, whether created automatically by Ignite or the context specified by the
user.public void setCamelContext(org.apache.camel.CamelContext camelCtx)
CamelContext to use.
Doing so gives the user the opportunity to attach custom components, a PropertiesComponent, set tracers, management strategies, etc.camelCtx - The Camel Context to use. In most cases, an instance of DefaultCamelContext.public String getEndpointUri()
public void setEndpointUri(String endpointUri)
endpointUri - The endpoint URI.public org.apache.camel.Processor getResponseProcessor()
Processor used to generate the response.Processor.public void setResponseProcessor(org.apache.camel.Processor resProc)
Processor used to generate the response.resProc - The Processor.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.5.11 Release Date : April 8 2016