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.ignite
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, setTupleExtractor
public 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.Processor
exchange
- The Camel Exchange.Exception
public 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 Database and Caching Platform : ver. 2.7.2 Release Date : February 6 2019