org.apache.camel.component.event
Class EventEndpoint

java.lang.Object
  extended by org.apache.camel.support.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by 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, Aware, ApplicationContextAware

public class EventEndpoint
extends org.apache.camel.impl.DefaultEndpoint
implements ApplicationContextAware

An Event Endpoint for working with Spring ApplicationEvents

Version:

Field Summary
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
EventEndpoint(String endpointUri)
          Deprecated. 
EventEndpoint(String endpointUri, EventComponent component)
           
 
Method Summary
 void consumerStarted(EventConsumer consumer)
           
 void consumerStopped(EventConsumer consumer)
           
 EventConsumer createConsumer(org.apache.camel.Processor processor)
           
protected  org.apache.camel.processor.loadbalancer.LoadBalancer createLoadBalancer()
           
 org.apache.camel.Producer createProducer()
           
 ApplicationContext getApplicationContext()
           
 EventComponent getComponent()
           
 org.apache.camel.processor.loadbalancer.LoadBalancer getLoadBalancer()
           
 boolean isSingleton()
           
 void onApplicationEvent(ApplicationEvent event)
           
 void setApplicationContext(ApplicationContext applicationContext)
           
 void setLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
           
protected  ApplicationEvent toApplicationEvent(org.apache.camel.Exchange exchange)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureConsumer, configurePollingConsumer, configureProperties, createEndpointConfiguration, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getConsumerProperties, getEndpointConfiguration, getEndpointKey, getEndpointUri, getExchangePattern, getId, hashCode, isLenientProperties, isSynchronous, setCamelContext, setConsumerProperties, setEndpointConfiguration, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setProperties, setSynchronous, toString
 
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, resume, shutdown, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

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 -
Method Detail

setApplicationContext

public void setApplicationContext(ApplicationContext applicationContext)
                           throws BeansException
Specified by:
setApplicationContext in interface ApplicationContextAware
Throws:
BeansException

getApplicationContext

public 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(ApplicationEvent event)

getLoadBalancer

public org.apache.camel.processor.loadbalancer.LoadBalancer getLoadBalancer()

setLoadBalancer

public void setLoadBalancer(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)

getComponent

public EventComponent getComponent()
Overrides:
getComponent in class org.apache.camel.impl.DefaultEndpoint

consumerStarted

public void consumerStarted(EventConsumer consumer)

consumerStopped

public void consumerStopped(EventConsumer consumer)

createLoadBalancer

protected org.apache.camel.processor.loadbalancer.LoadBalancer createLoadBalancer()

toApplicationEvent

protected ApplicationEvent toApplicationEvent(org.apache.camel.Exchange exchange)


Apache Camel