org.apache.camel.component.processor
Class ProcessorEndpoint

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

public class ProcessorEndpoint
extends DefaultEndpoint<Exchange>

A base class for creating Endpoint implementations from a Processor

Version:
$Revision: 1.1 $

Constructor Summary
protected ProcessorEndpoint(String endpointUri, Component component, Processor processor, LoadBalancer loadBalancer)
           
 
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
 LoadBalancer getLoadBalancer()
           
 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

protected ProcessorEndpoint(String endpointUri,
                            Component component,
                            Processor processor,
                            LoadBalancer loadBalancer)
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()

getLoadBalancer

public LoadBalancer getLoadBalancer()

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.