org.apache.camel.component.seda
Class SedaEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint
      extended by org.apache.camel.component.seda.SedaEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint, IsSingleton, MultipleConsumersSupport, Service, BrowsableEndpoint, HasId

public class SedaEndpoint
extends DefaultEndpoint
implements BrowsableEndpoint, MultipleConsumersSupport

An implementation of the Queue components for asynchronous SEDA exchanges on a BlockingQueue within a CamelContext

Version:
$Revision: 997615 $

Constructor Summary
SedaEndpoint()
           
SedaEndpoint(String endpointUri, BlockingQueue<Exchange> queue)
           
SedaEndpoint(String endpointUri, BlockingQueue<Exchange> queue, int concurrentConsumers)
           
SedaEndpoint(String endpointUri, Component component, BlockingQueue<Exchange> queue)
           
SedaEndpoint(String endpointUri, Component component, BlockingQueue<Exchange> queue, int concurrentConsumers)
           
 
Method Summary
 Consumer createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Producer createProducer()
          Creates a new producer which is used send messages into the endpoint
 int getConcurrentConsumers()
           
 Set<SedaConsumer> getConsumers()
          Returns the current active consumers on this endpoint
protected  MulticastProcessor getConumserMulticastProcessor()
           
 List<Exchange> getExchanges()
          Returns the current pending exchanges
 Set<SedaProducer> getProducers()
          Returns the current active producers on this endpoint
 BlockingQueue<Exchange> getQueue()
           
 int getSize()
           
 long getTimeout()
           
 WaitForTaskToComplete getWaitForTaskToComplete()
           
 boolean isMultipleConsumers()
           
 boolean isMultipleConsumersSupported()
          Is multiple consumers supported?
 boolean isSingleton()
          Whether this class supports being singleton or not.
 void setConcurrentConsumers(int concurrentConsumers)
           
 void setMultipleConsumers(boolean multipleConsumers)
           
 void setQueue(BlockingQueue<Exchange> queue)
           
 void setSize(int size)
           
 void setTimeout(long timeout)
           
 void setWaitForTaskToComplete(WaitForTaskToComplete waitForTaskToComplete)
           
protected  void updateMulticastProcessor()
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, createEndpointUri, createExchange, createExchange, createExchange, createPollingConsumer, equals, getCamelContext, getComponent, getEndpointKey, getEndpointUri, getExchangePattern, getExchangeType, getId, hashCode, isLenientProperties, isSynchronous, sanitizeUri, setCamelContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setSynchronous, start, stop, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.camel.Endpoint
configureProperties, createExchange, createExchange, createExchange, createPollingConsumer, getCamelContext, getEndpointKey, getEndpointUri, isLenientProperties, setCamelContext
 
Methods inherited from interface org.apache.camel.Service
start, stop
 

Constructor Detail

SedaEndpoint

public SedaEndpoint()

SedaEndpoint

public SedaEndpoint(String endpointUri,
                    Component component,
                    BlockingQueue<Exchange> queue)

SedaEndpoint

public SedaEndpoint(String endpointUri,
                    Component component,
                    BlockingQueue<Exchange> queue,
                    int concurrentConsumers)

SedaEndpoint

public SedaEndpoint(String endpointUri,
                    BlockingQueue<Exchange> queue)

SedaEndpoint

public SedaEndpoint(String endpointUri,
                    BlockingQueue<Exchange> queue,
                    int concurrentConsumers)
Method Detail

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 Consumer 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

getQueue

public BlockingQueue<Exchange> getQueue()

getConumserMulticastProcessor

protected MulticastProcessor getConumserMulticastProcessor()

updateMulticastProcessor

protected void updateMulticastProcessor()

setQueue

public void setQueue(BlockingQueue<Exchange> queue)

getSize

public int getSize()

setSize

public void setSize(int size)

setConcurrentConsumers

public void setConcurrentConsumers(int concurrentConsumers)

getConcurrentConsumers

public int getConcurrentConsumers()

getWaitForTaskToComplete

public WaitForTaskToComplete getWaitForTaskToComplete()

setWaitForTaskToComplete

public void setWaitForTaskToComplete(WaitForTaskToComplete waitForTaskToComplete)

getTimeout

public long getTimeout()

setTimeout

public void setTimeout(long timeout)

isMultipleConsumers

public boolean isMultipleConsumers()

setMultipleConsumers

public void setMultipleConsumers(boolean multipleConsumers)

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.

getExchanges

public List<Exchange> getExchanges()
Returns the current pending exchanges

Specified by:
getExchanges in interface BrowsableEndpoint
Returns:
the exchanges on this endpoint

isMultipleConsumersSupported

public boolean isMultipleConsumersSupported()
Description copied from interface: MultipleConsumersSupport
Is multiple consumers supported?

Specified by:
isMultipleConsumersSupported in interface MultipleConsumersSupport
Returns:
true if multiple consumers is supported

getConsumers

public Set<SedaConsumer> getConsumers()
Returns the current active consumers on this endpoint


getProducers

public Set<SedaProducer> getProducers()
Returns the current active producers on this endpoint



Apache CAMEL