org.apache.camel.component.event
Class EventEndpoint

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultEndpoint
          extended by org.apache.camel.component.event.EventEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, Service, ShutdownableService, HasId, org.springframework.context.ApplicationContextAware

public class EventEndpoint
extends DefaultEndpoint
implements org.springframework.context.ApplicationContextAware

An Event Endpoint for working with Spring ApplicationEvents

Version:

Constructor Summary
EventEndpoint(String endpointUri)
           
EventEndpoint(String endpointUri, EventComponent component)
           
 
Method Summary
 void consumerStarted(EventConsumer consumer)
           
 void consumerStopped(EventConsumer consumer)
           
 EventConsumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
protected  LoadBalancer createLoadBalancer()
           
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 org.springframework.context.ApplicationContext getApplicationContext()
           
 LoadBalancer getLoadBalancer()
           
 boolean isSingleton()
          Whether this class supports being singleton or not.
 void onApplicationEvent(org.springframework.context.ApplicationEvent event)
           
 void setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
           
 void setLoadBalancer(LoadBalancer loadBalancer)
           
protected  org.springframework.context.ApplicationEvent toApplicationEvent(Exchange exchange)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, doStart, doStop, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, toString
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, 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

public EventEndpoint(String endpointUri)
Method Detail

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()
Description copied from interface: IsSingleton
Whether this class supports being singleton or not.

Specified by:
isSingleton in interface IsSingleton
Returns:
true to be a single shared instance, false to create new instances.

createProducer

public Producer createProducer()
                        throws Exception
Description copied from interface: Endpoint
Creates a new producer which is used send messages into the endpoint

Specified by:
createProducer in interface Endpoint
Returns:
a newly created producer
Throws:
Exception - can be thrown

createConsumer

public EventConsumer createConsumer(Processor processor)
                             throws Exception
Description copied from interface: Endpoint
Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor

Specified by:
createConsumer in interface Endpoint
Parameters:
processor - the given processor
Returns:
a newly created consumer
Throws:
Exception - can be thrown

onApplicationEvent

public void onApplicationEvent(org.springframework.context.ApplicationEvent event)

getLoadBalancer

public LoadBalancer getLoadBalancer()

setLoadBalancer

public void setLoadBalancer(LoadBalancer loadBalancer)

consumerStarted

public void consumerStarted(EventConsumer consumer)

consumerStopped

public void consumerStopped(EventConsumer consumer)

createLoadBalancer

protected LoadBalancer createLoadBalancer()

toApplicationEvent

protected org.springframework.context.ApplicationEvent toApplicationEvent(Exchange exchange)


Apache CAMEL