org.apache.camel.component.direct
Class DirectEndpoint<E extends Exchange>

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint<E>
      extended by org.apache.camel.component.direct.DirectEndpoint<E>
All Implemented Interfaces:
CamelContextAware, Endpoint<E>

public class DirectEndpoint<E extends Exchange>
extends DefaultEndpoint<E>

Represents a direct endpoint that synchronously invokes the consumers of the endpoint when a producer sends a message to it.

Version:
$Revision: 585 $

Constructor Summary
DirectEndpoint(String endpointUri)
           
DirectEndpoint(String uri, DirectComponent<E> component)
           
 
Method Summary
 Consumer<E> 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
 List<DefaultConsumer<E>> getConsumers()
           
 boolean isAllowMultipleConsumers()
           
 boolean isSingleton()
          Returns if the endpoint should be a CamelContext singleton.
 void setAllowMultipleConsumers(boolean allowMutlipleConsumers)
           
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
configureProperties, convertTo, createEndpointUri, createExchange, createExchange, createExchange, createExecutorService, createPollingConsumer, equals, getCamelContext, getComponent, getContext, getEndpointUri, getExchangePattern, getExchangeType, getExecutorService, hashCode, isLenientProperties, setCamelContext, setContext, setEndpointUri, setEndpointUriIfNotSpecified, setExchangePattern, setExecutorService, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DirectEndpoint

public DirectEndpoint(String uri,
                      DirectComponent<E> component)

DirectEndpoint

public DirectEndpoint(String endpointUri)
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

Returns:
a newly created producer
Throws:
Exception

createConsumer

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

Returns:
a newly created consumer
Throws:
Exception

isAllowMultipleConsumers

public boolean isAllowMultipleConsumers()

setAllowMultipleConsumers

public void setAllowMultipleConsumers(boolean allowMutlipleConsumers)

isSingleton

public boolean isSingleton()
Description copied from interface: Endpoint
Returns if the endpoint should be a CamelContext singleton. If the endpoint is a Singleton, then a single Endpoint instance will be shared by all routes with the same URI. Because the endpoint is shared, it should be treated as an immutable.


getConsumers

public List<DefaultConsumer<E>> getConsumers()


Copyright © 2009 IONA Open Source Community. All Rights Reserved.