public class InterceptSendToEndpoint extends Object implements Endpoint
Constructor and Description |
---|
InterceptSendToEndpoint(Endpoint destination,
boolean skip)
Intercepts sending to the given endpoint
|
Modifier and Type | Method and Description |
---|---|
void |
configureProperties(Map<String,Object> options)
Configure properties on this 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(Exchange exchange)
Deprecated.
|
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 Endpoint.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
|
Endpoint |
getDelegate() |
EndpointConfiguration |
getEndpointConfiguration()
Returns the object representation of the endpoint configuration
|
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.
|
boolean |
isSingleton()
Whether this class supports being singleton or not.
|
void |
setCamelContext(CamelContext context)
Sets the camel context.
|
void |
setDetour(Processor detour) |
void |
start()
Starts the service
|
void |
stop()
Stops the service
|
String |
toString() |
public InterceptSendToEndpoint(Endpoint destination, boolean skip)
destination
- the original endpointskip
- true to skip sending after the detour to the original endpointpublic Endpoint getDelegate()
public String getEndpointUri()
Endpoint
getEndpointUri
in interface Endpoint
public EndpointConfiguration getEndpointConfiguration()
Endpoint
getEndpointConfiguration
in interface Endpoint
public String getEndpointKey()
Endpoint
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.getEndpointKey
in interface Endpoint
public Exchange createExchange()
Endpoint
createExchange
in interface Endpoint
public Exchange createExchange(ExchangePattern pattern)
Endpoint
ExchangePattern
such as whether its going
to be an ExchangePattern.InOnly
or ExchangePattern.InOut
exchangecreateExchange
in interface Endpoint
pattern
- the message exchange pattern for the exchange@Deprecated public Exchange createExchange(Exchange exchange)
Endpoint
createExchange
in interface Endpoint
exchange
- given exchange to use for pre-populatepublic CamelContext getCamelContext()
Endpoint
getCamelContext
in interface Endpoint
public Producer createProducer() throws Exception
Endpoint
createProducer
in interface Endpoint
Exception
- can be thrownpublic Consumer createConsumer(Processor processor) throws Exception
Endpoint
createConsumer
in interface Endpoint
processor
- the given processorException
- can be thrownpublic PollingConsumer createPollingConsumer() throws Exception
Endpoint
PollingConsumer.receive()
,
PollingConsumer.receiveNoWait()
or
PollingConsumer.receive(long)
whenever it is ready to do so
rather than using the Event
Based Consumer returned by Endpoint.createConsumer(Processor)
createPollingConsumer
in interface Endpoint
Exception
- if the pull consumer could not be createdpublic void configureProperties(Map<String,Object> options)
Endpoint
configureProperties
in interface Endpoint
options
- the options (properties)public void setCamelContext(CamelContext context)
Endpoint
setCamelContext
in interface Endpoint
context
- the camel contextpublic boolean isLenientProperties()
Endpoint
isLenientProperties
in interface Endpoint
public boolean isSingleton()
IsSingleton
isSingleton
in interface IsSingleton
public void start() throws Exception
Service
public void stop() throws Exception
Service
Apache Camel