org.apache.camel.component.event
Class EventEndpoint
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.impl.DefaultEndpoint
org.apache.camel.component.event.EventEndpoint
- All Implemented Interfaces:
- org.apache.camel.CamelContextAware, org.apache.camel.Endpoint, org.apache.camel.IsSingleton, org.apache.camel.Service, org.apache.camel.ShutdownableService, org.apache.camel.spi.HasId, org.apache.camel.StatefulService, org.apache.camel.SuspendableService, org.springframework.context.ApplicationContextAware
public class EventEndpoint
- extends org.apache.camel.impl.DefaultEndpoint
- implements org.springframework.context.ApplicationContextAware
An Event Endpoint
for working with Spring ApplicationEvents
- Version:
Fields inherited from class org.apache.camel.support.ServiceSupport |
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending |
Methods inherited from class org.apache.camel.impl.DefaultEndpoint |
configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString |
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from interface org.apache.camel.Service |
start, stop |
EventEndpoint
public EventEndpoint(String endpointUri,
EventComponent component)
EventEndpoint
@Deprecated
public EventEndpoint(String endpointUri)
- Deprecated.
- Note: It is preferred to create endpoints using the associated
component.
- Parameters:
endpointUri
-
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
throws org.springframework.beans.BeansException
- Specified by:
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
- Throws:
org.springframework.beans.BeansException
getApplicationContext
public org.springframework.context.ApplicationContext getApplicationContext()
isSingleton
public boolean isSingleton()
- Specified by:
isSingleton
in interface org.apache.camel.IsSingleton
createProducer
public org.apache.camel.Producer createProducer()
throws Exception
- Specified by:
createProducer
in interface org.apache.camel.Endpoint
- Throws:
Exception
createConsumer
public EventConsumer createConsumer(org.apache.camel.Processor processor)
throws Exception
- Specified by:
createConsumer
in interface org.apache.camel.Endpoint
- Throws:
Exception
onApplicationEvent
public void onApplicationEvent(org.springframework.context.ApplicationEvent event)
getLoadBalancer
public org.apache.camel.processor.loadbalancer.LoadBalancer getLoadBalancer()
setLoadBalancer
public void setLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
consumerStarted
public void consumerStarted(EventConsumer consumer)
consumerStopped
public void consumerStopped(EventConsumer consumer)
createLoadBalancer
protected org.apache.camel.processor.loadbalancer.LoadBalancer createLoadBalancer()
toApplicationEvent
protected org.springframework.context.ApplicationEvent toApplicationEvent(org.apache.camel.Exchange exchange)
Apache CAMEL