org.apache.camel.impl
Class ProcessorEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint<E>
      extended by org.apache.camel.impl.ScheduledPollEndpoint<E>
          extended by org.apache.camel.impl.DefaultPollingEndpoint<Exchange>
              extended by org.apache.camel.impl.ProcessorEndpoint
All Implemented Interfaces:
CamelContextAware, Endpoint<Exchange>
Direct Known Subclasses:
BeanEndpoint

public class ProcessorEndpoint
extends DefaultPollingEndpoint<Exchange>

An endpoint which allows exchanges to be sent into it which just invokes a given Processor. This component does not support the use of consumers.

Version:
$Revision: 41409 $

Constructor Summary
protected ProcessorEndpoint()
           
protected ProcessorEndpoint(String endpointUri)
           
  ProcessorEndpoint(String endpointUri, CamelContext context, Processor processor)
           
protected ProcessorEndpoint(String endpointUri, Component component)
           
  ProcessorEndpoint(String endpointUri, Component component, Processor processor)
           
  ProcessorEndpoint(String endpointUri, Processor processor)
           
 
Method Summary
 PollingConsumer<Exchange> createPollingConsumer()
          Creates a new Polling Consumer so that the caller can poll message exchanges from the consumer using PollingConsumer.receive(), PollingConsumer.receiveNoWait() or PollingConsumer.receive(long) whenever it is ready to do so rather than using the Event Based Consumer returned by Endpoint.createConsumer(Processor)
protected  Processor createProcessor()
           
 Producer<Exchange> createProducer()
          Creates a new producer which is used send messages into the endpoint
 Processor getProcessor()
           
 boolean isSingleton()
          Returns if the endpoint should be a CamelContext singleton.
protected  void onExchange(Exchange exchange)
           
 
Methods inherited from class org.apache.camel.impl.DefaultPollingEndpoint
createConsumer
 
Methods inherited from class org.apache.camel.impl.ScheduledPollEndpoint
configureConsumer, configureProperties, getConsumerProperties, setConsumerProperties
 
Methods inherited from class org.apache.camel.impl.DefaultEndpoint
convertTo, createEndpointUri, createExchange, createExchange, createExchange, createExecutorService, 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

ProcessorEndpoint

protected ProcessorEndpoint()

ProcessorEndpoint

protected ProcessorEndpoint(String endpointUri)

ProcessorEndpoint

public ProcessorEndpoint(String endpointUri,
                         CamelContext context,
                         Processor processor)

ProcessorEndpoint

public ProcessorEndpoint(String endpointUri,
                         Component component,
                         Processor processor)

ProcessorEndpoint

public ProcessorEndpoint(String endpointUri,
                         Processor processor)

ProcessorEndpoint

protected ProcessorEndpoint(String endpointUri,
                            Component component)
Method Detail

createProducer

public Producer<Exchange> 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

createPollingConsumer

public PollingConsumer<Exchange> createPollingConsumer()
                                                throws Exception
Description copied from interface: Endpoint
Creates a new Polling Consumer so that the caller can poll message exchanges from the consumer using PollingConsumer.receive(), PollingConsumer.receiveNoWait() or PollingConsumer.receive(long) whenever it is ready to do so rather than using the Event Based Consumer returned by Endpoint.createConsumer(Processor)

Specified by:
createPollingConsumer in interface Endpoint<Exchange>
Overrides:
createPollingConsumer in class DefaultEndpoint<Exchange>
Returns:
a newly created pull consumer
Throws:
Exception - if the pull consumer could not be created

getProcessor

public Processor getProcessor()
                       throws Exception
Throws:
Exception

createProcessor

protected Processor createProcessor()
                             throws Exception
Throws:
Exception

onExchange

protected void onExchange(Exchange exchange)
                   throws Exception
Throws:
Exception

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.



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