|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.impl.DefaultEndpoint<E>
public abstract class DefaultEndpoint<E extends Exchange>
A default endpoint useful for implementation inheritance
Constructor Summary | |
---|---|
protected |
DefaultEndpoint()
|
protected |
DefaultEndpoint(String endpointUri)
|
protected |
DefaultEndpoint(String endpointUri,
CamelContext camelContext)
|
protected |
DefaultEndpoint(String endpointUri,
Component component)
|
Method Summary | |
---|---|
void |
configureProperties(Map options)
|
E |
convertTo(Class<E> type,
Exchange exchange)
Converts the given exchange to the specified exchange type |
protected String |
createEndpointUri()
A factory method to lazily create the endpointUri if none is specified |
E |
createExchange()
Create a new exchange for communicating with this endpoint |
E |
createExchange(Exchange exchange)
Creates a new exchange for communicating with this exchange using the given exchange to pre-populate the values of the headers and messages |
E |
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 |
protected ScheduledThreadPoolExecutor |
createExecutorService()
|
PollingConsumer<E> |
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) |
boolean |
equals(Object object)
|
CamelContext |
getCamelContext()
Returns the context which created the endpoint |
Component |
getComponent()
|
CamelContext |
getContext()
Deprecated. |
String |
getEndpointUri()
Returns the string representation of the endpoint URI |
ExchangePattern |
getExchangePattern()
|
Class<E> |
getExchangeType()
Returns the type of the exchange which is generated by this component |
ScheduledExecutorService |
getExecutorService()
|
int |
hashCode()
|
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 lenient = true means that the endpoint allows additional unknown options to be passed to it but does not throw a ResolveEndpointFailedException when creating the endpoint. |
void |
setCamelContext(CamelContext camelContext)
Injects the CamelContext |
void |
setContext(CamelContext context)
Deprecated. |
protected void |
setEndpointUri(String endpointUri)
|
void |
setEndpointUriIfNotSpecified(String value)
Sets the endpointUri if it has not been specified yet via some kind of dependency injection mechanism. |
void |
setExchangePattern(ExchangePattern exchangePattern)
|
void |
setExecutorService(ScheduledExecutorService executorService)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.apache.camel.Endpoint |
---|
createConsumer, createProducer, isSingleton |
Constructor Detail |
---|
protected DefaultEndpoint(String endpointUri, Component component)
protected DefaultEndpoint(String endpointUri, CamelContext camelContext)
protected DefaultEndpoint(String endpointUri)
protected DefaultEndpoint()
Method Detail |
---|
public int hashCode()
hashCode
in class Object
public boolean equals(Object object)
equals
in class Object
public String toString()
toString
in class Object
public String getEndpointUri()
Endpoint
getEndpointUri
in interface Endpoint<E extends Exchange>
public CamelContext getCamelContext()
Endpoint
getCamelContext
in interface Endpoint<E extends Exchange>
public Component getComponent()
public void setCamelContext(CamelContext camelContext)
CamelContextAware
CamelContext
setCamelContext
in interface CamelContextAware
setCamelContext
in interface Endpoint<E extends Exchange>
public ScheduledExecutorService getExecutorService()
public void setExecutorService(ScheduledExecutorService executorService)
public PollingConsumer<E> 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<E extends Exchange>
Exception
- if the pull consumer could not be createdpublic E convertTo(Class<E> type, Exchange exchange)
public E createExchange(Exchange exchange)
Endpoint
createExchange
in interface Endpoint<E extends Exchange>
public Class<E> getExchangeType()
public E createExchange()
Endpoint
createExchange
in interface Endpoint<E extends Exchange>
public E createExchange(ExchangePattern pattern)
Endpoint
ExchangePattern
such as whether its going
to be an ExchangePattern.InOnly
or ExchangePattern.InOut
exchange
createExchange
in interface Endpoint<E extends Exchange>
pattern
- the message exchange pattern for the exchangepublic ExchangePattern getExchangePattern()
public void setExchangePattern(ExchangePattern exchangePattern)
protected ScheduledThreadPoolExecutor createExecutorService()
public void configureProperties(Map options)
configureProperties
in interface Endpoint<E extends Exchange>
protected String createEndpointUri()
protected void setEndpointUri(String endpointUri)
public void setEndpointUriIfNotSpecified(String value)
@Deprecated public CamelContext getContext()
getContext
in interface Endpoint<E extends Exchange>
@Deprecated public void setContext(CamelContext context)
setContext
in interface Endpoint<E extends Exchange>
public boolean isLenientProperties()
Endpoint
isLenientProperties
in interface Endpoint<E extends Exchange>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |