org.apache.camel.impl
Class ProcessorEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint<Exchange>
      extended by org.apache.camel.impl.ProcessorEndpoint
All Implemented Interfaces:
Endpoint<Exchange>

public class ProcessorEndpoint
extends DefaultEndpoint<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: 1.1 $

Constructor Summary
ProcessorEndpoint(String endpointUri, CamelContext context, Processor processor)
           
ProcessorEndpoint(String endpointUri, Component component, Processor processor)
           
 
Method Summary
 Consumer<Exchange> createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 Exchange createExchange()
          Create a new exchange for communicating with this endpoint
 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.DefaultEndpoint
convertTo, createExchange, createExecutorService, createPollingConsumer, equals, getComponent, getContext, getEndpointUri, getExchangeType, getExecutorService, hashCode, setExecutorService, toExchangeType, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessorEndpoint

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

ProcessorEndpoint

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

createExchange

public Exchange createExchange()
Description copied from interface: Endpoint
Create a new exchange for communicating with this endpoint


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

createConsumer

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

getProcessor

public Processor getProcessor()

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 © 2007 Apache Software Foundation. All Rights Reserved.