@UriEndpoint(scheme="guava-eventbus", title="Guava EventBus", syntax="guava-eventbus:eventBusRef", consumerClass=GuavaEventBusConsumer.class, label="eventbus") public class GuavaEventBusEndpoint extends org.apache.camel.impl.DefaultEndpoint implements org.apache.camel.MultipleConsumersSupport
Constructor and Description |
---|
GuavaEventBusEndpoint(String endpointUri,
org.apache.camel.Component component,
com.google.common.eventbus.EventBus eventBus,
Class<?> listenerInterface) |
Modifier and Type | Method and Description |
---|---|
org.apache.camel.Consumer |
createConsumer(org.apache.camel.Processor processor) |
org.apache.camel.Exchange |
createExchange(Object event) |
org.apache.camel.Producer |
createProducer() |
protected void |
doStart() |
com.google.common.eventbus.EventBus |
getEventBus() |
String |
getEventBusRef() |
Class<?> |
getEventClass() |
Class<?> |
getListenerInterface() |
boolean |
isMultipleConsumersSupported() |
boolean |
isSingleton() |
void |
setEventBus(com.google.common.eventbus.EventBus eventBus)
To use the given Guava EventBus instance
|
void |
setEventBusRef(String eventBusRef)
To lookup the Guava EventBus from the registry with the given name
|
void |
setEventClass(Class<?> eventClass)
If used on the consumer side of the route, will filter events received from the EventBus to the instances of
the class and superclasses of eventClass.
|
void |
setListenerInterface(Class<?> listenerInterface)
The interface with method(s) marked with the @Subscribe annotation.
|
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStop, equals, getCamelContext, getComponent, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExceptionHandler, getExchangePattern, getId, getPollingConsumerBlockTimeout, getPollingConsumerQueueSize, hashCode, isBridgeErrorHandler, isLenientProperties, isPollingConsumerBlockWhenFull, isSynchronous, setBridgeErrorHandler, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExceptionHandler, setExchangePattern, setPollingConsumerBlockTimeout, setPollingConsumerBlockWhenFull, setPollingConsumerQueueSize, setProperties, setSynchronous, toString
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
public org.apache.camel.Producer createProducer() throws Exception
createProducer
in interface org.apache.camel.Endpoint
Exception
public org.apache.camel.Consumer createConsumer(org.apache.camel.Processor processor) throws Exception
createConsumer
in interface org.apache.camel.Endpoint
Exception
public boolean isSingleton()
isSingleton
in interface org.apache.camel.IsSingleton
public boolean isMultipleConsumersSupported()
isMultipleConsumersSupported
in interface org.apache.camel.MultipleConsumersSupport
public org.apache.camel.Exchange createExchange(Object event)
public String getEventBusRef()
public void setEventBusRef(String eventBusRef)
public com.google.common.eventbus.EventBus getEventBus()
public void setEventBus(com.google.common.eventbus.EventBus eventBus)
public Class<?> getEventClass()
public void setEventClass(Class<?> eventClass)
public Class<?> getListenerInterface()
public void setListenerInterface(Class<?> listenerInterface)
Apache Camel