org.apache.camel.component.pojo
Class PojoEndpoint

java.lang.Object
  extended by org.apache.camel.impl.DefaultEndpoint<PojoExchange>
      extended by org.apache.camel.component.pojo.PojoEndpoint
All Implemented Interfaces:
Endpoint<PojoExchange>

public class PojoEndpoint
extends DefaultEndpoint<PojoExchange>

Represents a pojo endpoint that uses reflection to send messages around.

Version:
$Revision: 519973 $

Constructor Summary
PojoEndpoint(String uri, Component component, Object pojo)
           
 
Method Summary
 Consumer<PojoExchange> createConsumer(Processor processor)
          Creates a new Event Driven Consumer which consumes messages from the endpoint using the given processor
 PojoExchange createExchange()
          Create a new exchange for communicating with this endpoint
 Producer<PojoExchange> createProducer()
          Creates a new producer which is used send messages into the endpoint
 Object getPojo()
           
static void invoke(Object pojo, PojoExchange exchange)
          This causes us to invoke the endpoint Pojo using reflection.
 boolean isSingleton()
          Returns if the endpoint should be a CamelContext singleton.
 void setPojo(Object pojo)
           
 
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

PojoEndpoint

public PojoEndpoint(String uri,
                    Component component,
                    Object pojo)
Method Detail

createProducer

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

invoke

public static void invoke(Object pojo,
                          PojoExchange exchange)
This causes us to invoke the endpoint Pojo using reflection.

Parameters:
pojo -

createExchange

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


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.


getPojo

public Object getPojo()

setPojo

public void setPojo(Object pojo)


Copyright © 2007 Apache Software Foundation. All Rights Reserved.