org.apache.camel.component.pojo
Class PojoComponent

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.DefaultComponent<PojoExchange>
          extended by org.apache.camel.component.pojo.PojoComponent
All Implemented Interfaces:
Component<PojoExchange>, Service

public class PojoComponent
extends DefaultComponent<PojoExchange>

Represents the component that manages PojoEndpoint. It holds the list of named pojos that queue endpoints reference.

Version:
$Revision: 519973 $

Field Summary
protected  HashMap<String,Object> services
           
 
Constructor Summary
PojoComponent()
           
 
Method Summary
 void addService(String uri, Object pojo)
           
protected  Endpoint<PojoExchange> createEndpoint(String uri, String remaining, Map parameters)
          A factory method allowing derived components to create a new endpoint from the given URI, remaining path and optional parameters
static Object createProxy(Endpoint endpoint, Class[] interfaces)
          Creates a Proxy which sends PojoExchange to the endpoint.
static
<T> T
createProxy(Endpoint endpoint, Class<T> interfaceClass)
          Creates a Proxy which sends PojoExchange to the endpoint.
static Object createProxy(Endpoint endpoint, ClassLoader cl, Class[] interfaces)
          Creates a Proxy which sends PojoExchange to the endpoint.
static
<T> T
createProxy(Endpoint endpoint, ClassLoader cl, Class<T> interfaceClass)
          Creates a Proxy which sends PojoExchange to the endpoint.
 Object getService(String uri)
           
 void removeService(String uri)
           
 
Methods inherited from class org.apache.camel.impl.DefaultComponent
createEndpoint, createExecutorService, doStart, doStop, getCamelContext, getExecutorService, setCamelContext, setExecutorService
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
getThreadName, isStarted, isStopped, isStopping, nextThreadCounter, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

services

protected final HashMap<String,Object> services
Constructor Detail

PojoComponent

public PojoComponent()
Method Detail

addService

public void addService(String uri,
                       Object pojo)

removeService

public void removeService(String uri)

getService

public Object getService(String uri)

createEndpoint

protected Endpoint<PojoExchange> createEndpoint(String uri,
                                                String remaining,
                                                Map parameters)
                                         throws Exception
Description copied from class: DefaultComponent
A factory method allowing derived components to create a new endpoint from the given URI, remaining path and optional parameters

Specified by:
createEndpoint in class DefaultComponent<PojoExchange>
Parameters:
uri - the full URI of the endpoint
remaining - the remaining part of the URI without the query parameters or component prefix
parameters - the optional parameters passed in
Returns:
a newly created endpoint or null if the endpoint cannot be created based on the inputs
Throws:
Exception

createProxy

public static Object createProxy(Endpoint endpoint,
                                 ClassLoader cl,
                                 Class[] interfaces)
                          throws Exception
Creates a Proxy which sends PojoExchange to the endpoint.

Throws:
Exception

createProxy

public static Object createProxy(Endpoint endpoint,
                                 Class[] interfaces)
                          throws Exception
Creates a Proxy which sends PojoExchange to the endpoint.

Throws:
Exception

createProxy

public static <T> T createProxy(Endpoint endpoint,
                                ClassLoader cl,
                                Class<T> interfaceClass)
                     throws Exception
Creates a Proxy which sends PojoExchange to the endpoint.

Throws:
Exception

createProxy

public static <T> T createProxy(Endpoint endpoint,
                                Class<T> interfaceClass)
                     throws Exception
Creates a Proxy which sends PojoExchange to the endpoint.

Throws:
Exception


Copyright © 2007 Apache Software Foundation. All Rights Reserved.