public interface Endpoint extends IsSingleton, Service
Modifier and Type | Method and Description |
---|---|
void |
configureProperties(Map<String,Object> options)
Configure properties on this endpoint.
|
AsyncProducer |
createAsyncProducer()
Creates a new producer which is used send messages into the endpoint
|
Consumer |
createConsumer(Processor processor)
Creates a new Event Driven Consumer which
consumes messages from the endpoint using the given processor
|
Exchange |
createExchange()
Create a new exchange for communicating with this endpoint
|
Exchange |
createExchange(ExchangePattern pattern)
Create a new exchange for communicating with this endpoint with the specified
ExchangePattern such as
whether its going to be an ExchangePattern.InOnly or ExchangePattern.InOut exchange |
PollingConsumer |
createPollingConsumer()
Creates a new Polling Consumer so that the caller can
poll message exchanges from the consumer using
PollingConsumer.receive() ,
PollingConsumer.receiveNoWait() or PollingConsumer.receive(long) whenever it is ready to do so
rather than using the Event Based Consumer
returned by createConsumer(Processor) |
Producer |
createProducer()
Creates a new producer which is used send messages into the endpoint
|
CamelContext |
getCamelContext()
Returns the context which created the endpoint
|
default String |
getEndpointBaseUri()
Returns the string representation of the base endpoint URI (without query parameters).
|
String |
getEndpointKey()
Returns a string key of this endpoint.
|
String |
getEndpointUri()
Returns the string representation of the endpoint URI
|
boolean |
isLenientProperties()
Should all properties be known or does the endpoint allow unknown options?
lenient = false means that the endpoint should validate that all given options is known and configured
properly.
|
default boolean |
isSingletonProducer()
Whether this endpoint creates singleton producers
|
void |
setCamelContext(CamelContext context)
Sets the camel context.
|
isSingleton, test
String getEndpointUri()
default String getEndpointBaseUri()
String getEndpointKey()
LifecycleStrategy
when registering endpoint. This allows to
register different instances of endpoints with the same key.
For JMX mbeans this allows us to use the same JMX Mbean for all endpoints that are logical the same but have
different parameters. For instance the http endpoint.Exchange createExchange()
Exchange createExchange(ExchangePattern pattern)
ExchangePattern
such as
whether its going to be an ExchangePattern.InOnly
or ExchangePattern.InOut
exchangepattern
- the message exchange pattern for the exchangeCamelContext getCamelContext()
Producer createProducer() throws Exception
Exception
- can be throwndefault boolean isSingletonProducer()
AsyncProducer createAsyncProducer() throws Exception
Exception
- can be thrownConsumer createConsumer(Processor processor) throws Exception
processor
- the given processorException
- can be thrownPollingConsumer createPollingConsumer() throws Exception
PollingConsumer.receive()
,
PollingConsumer.receiveNoWait()
or PollingConsumer.receive(long)
whenever it is ready to do so
rather than using the Event Based Consumer
returned by createConsumer(Processor)
Exception
- if the pull consumer could not be createdvoid configureProperties(Map<String,Object> options)
options
- the options (properties)void setCamelContext(CamelContext context)
context
- the camel contextboolean isLenientProperties()
Apache Camel