org.apache.camel.impl
Class ProducerCache

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.impl.ProducerCache
All Implemented Interfaces:
Service

public class ProducerCache
extends ServiceSupport

Cache containing created Producer.

Version:
$Revision: 749193 $

Constructor Summary
ProducerCache()
           
 
Method Summary
protected  void doStart()
           
protected  void doStop()
           
 Producer getProducer(Endpoint endpoint)
           
static boolean isProcessedSync(Exchange exchange)
           
 void send(Endpoint endpoint, Exchange exchange)
          Sends the exchange to the given endpoint
 Exchange send(Endpoint endpoint, ExchangePattern pattern, Processor processor)
          Sends an exchange to an endpoint using a supplied Processor to populate the exchange
 Exchange send(Endpoint endpoint, Processor processor)
          Sends an exchange to an endpoint using a supplied Processor to populate the exchange
 Exchange send(Endpoint endpoint, Processor processor, AsyncCallback callback)
          Sends an exchange to an endpoint using a supplied Processor to populate the exchange.
protected  Exchange sendExchange(Endpoint endpoint, Producer producer, Processor processor, Exchange exchange)
           
protected  boolean sendExchange(Endpoint endpoint, Producer producer, Processor processor, Exchange exchange, AsyncCallback callback)
           
static void setProcessedSync(Exchange exchange, boolean sync)
           
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, getStatus, getThreadName, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, nextThreadCounter, notStarting, removeChildService, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProducerCache

public ProducerCache()
Method Detail

getProducer

public Producer getProducer(Endpoint endpoint)

send

public void send(Endpoint endpoint,
                 Exchange exchange)
Sends the exchange to the given endpoint

Parameters:
endpoint - the endpoint to send the exchange to
exchange - the exchange to send

send

public Exchange send(Endpoint 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 to
processor - the transformer used to populate the new exchange

send

public Exchange send(Endpoint 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 to
processor - the transformer used to populate the new exchange

isProcessedSync

public static boolean isProcessedSync(Exchange exchange)

setProcessedSync

public static void setProcessedSync(Exchange exchange,
                                    boolean sync)

send

public Exchange send(Endpoint 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 to
pattern - the message ExchangePattern such as ExchangePattern.InOnly or ExchangePattern.InOut
processor - the transformer used to populate the new exchange

sendExchange

protected Exchange sendExchange(Endpoint endpoint,
                                Producer producer,
                                Processor processor,
                                Exchange exchange)
                         throws Exception
Throws:
Exception

sendExchange

protected boolean sendExchange(Endpoint endpoint,
                               Producer producer,
                               Processor processor,
                               Exchange 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 © 2009 Apache Software Foundation. All Rights Reserved.