org.apache.camel.util
Class ProducerCache<E extends Exchange>
java.lang.Object
org.apache.camel.impl.ServiceSupport
org.apache.camel.util.ProducerCache<E>
- All Implemented Interfaces:
- Service
public class ProducerCache<E extends Exchange>
- extends ServiceSupport
- Version:
- $Revision: 36635 $
Method Summary |
protected void |
doStart()
|
protected void |
doStop()
|
Producer<E> |
getProducer(Endpoint<E> endpoint)
|
static boolean |
isProcessedSync(Exchange exchange)
|
void |
send(Endpoint<E> endpoint,
E exchange)
Sends the exchange to the given endpoint |
E |
send(Endpoint<E> endpoint,
ExchangePattern pattern,
Processor processor)
Sends an exchange to an endpoint using a supplied
Processor to populate the exchange |
E |
send(Endpoint<E> endpoint,
Processor processor)
Sends an exchange to an endpoint using a supplied
Processor to populate the exchange |
E |
send(Endpoint<E> endpoint,
Processor processor,
AsyncCallback callback)
Sends an exchange to an endpoint using a supplied
Processor to populate the exchange. |
protected E |
sendExchange(Endpoint<E> endpoint,
Producer<E> producer,
Processor processor,
E exchange)
|
protected boolean |
sendExchange(Endpoint<E> endpoint,
Producer<E> producer,
Processor processor,
E exchange,
AsyncCallback callback)
|
static void |
setProcessedSync(Exchange exchange,
boolean b)
|
Methods inherited from class org.apache.camel.impl.ServiceSupport |
addChildService, getThreadName, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, removeChildService, start, stop |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProducerCache
public ProducerCache()
getProducer
public Producer<E> getProducer(Endpoint<E> endpoint)
send
public void send(Endpoint<E> endpoint,
E exchange)
- Sends the exchange to the given endpoint
- Parameters:
endpoint
- the endpoint to send the exchange toexchange
- the exchange to send
send
public E send(Endpoint<E> endpoint,
Processor processor)
- Sends an exchange to an endpoint using a supplied
Processor
to populate the exchange
- Parameters:
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchange
send
public E send(Endpoint<E> endpoint,
Processor processor,
AsyncCallback callback)
- Sends an exchange to an endpoint using a supplied
Processor
to populate the exchange. The callback
will be called when the exchange is completed.
- Parameters:
endpoint
- the endpoint to send the exchange toprocessor
- the transformer used to populate the new exchange
isProcessedSync
public static boolean isProcessedSync(Exchange exchange)
setProcessedSync
public static void setProcessedSync(Exchange exchange,
boolean b)
send
public E send(Endpoint<E> endpoint,
ExchangePattern pattern,
Processor processor)
- Sends an exchange to an endpoint using a supplied
Processor
to populate the exchange
- Parameters:
endpoint
- the endpoint to send the exchange topattern
- the message ExchangePattern
such as
ExchangePattern.InOnly
or ExchangePattern.InOut
processor
- the transformer used to populate the new exchange
sendExchange
protected E sendExchange(Endpoint<E> endpoint,
Producer<E> producer,
Processor processor,
E exchange)
throws Exception
- Throws:
Exception
sendExchange
protected boolean sendExchange(Endpoint<E> endpoint,
Producer<E> producer,
Processor processor,
E exchange,
AsyncCallback callback)
throws Exception
- Throws:
Exception
doStop
protected void doStop()
throws Exception
- Specified by:
doStop
in class ServiceSupport
- Throws:
Exception
doStart
protected void doStart()
throws Exception
- Specified by:
doStart
in class ServiceSupport
- Throws:
Exception
Copyright © 2008 IONA Open Source Community. All Rights Reserved.