akka.camel.internal.component
Class ActorProducer

java.lang.Object
  extended by org.apache.camel.impl.DefaultProducer
      extended by akka.camel.internal.component.ActorProducer

public class ActorProducer
extends org.apache.camel.impl.DefaultProducer

Sends the in-message of an exchange to an untyped actor, identified by an akka.camel.internal.component.ActorEndPoint

See Also:
akka.camel.component.ActorComponent,


Constructor Summary
ActorProducer(ActorEndpoint endpoint, Camel camel)
           
 
Method Summary
 ActorEndpoint endpoint()
           
 void process(org.apache.camel.Exchange exchange)
          Processes the exchange.
 boolean process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
          Processes the message exchange.
 void processExchangeAdapter(CamelExchangeAdapter exchange)
          INTERNAL API Processes the CamelExchangeAdapter
 boolean processExchangeAdapter(CamelExchangeAdapter exchange, org.apache.camel.AsyncCallback callback)
          INTERNAL API Processes the CamelExchangeAdapter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActorProducer

public ActorProducer(ActorEndpoint endpoint,
                     Camel camel)
Method Detail

endpoint

public ActorEndpoint endpoint()

process

public void process(org.apache.camel.Exchange exchange)
Processes the exchange. Calls the synchronous version of the method and waits for the result (blocking).

Parameters:
exchange - the exchange to process

process

public boolean process(org.apache.camel.Exchange exchange,
                       org.apache.camel.AsyncCallback callback)
Processes the message exchange. the caller supports having the exchange asynchronously processed. If there was a failure processing then the caused Exception would be set on the Exchange.

Parameters:
exchange - the message exchange
callback - the AsyncCallback will be invoked when the processing of the exchange is completed. If the exchange is completed synchronously, then the callback is also invoked synchronously. The callback should therefore be careful of starting recursive loop.
Returns:
(doneSync) true to continue execute synchronously, false to continue being executed asynchronously

processExchangeAdapter

public void processExchangeAdapter(CamelExchangeAdapter exchange)
INTERNAL API Processes the CamelExchangeAdapter

Parameters:
exchange - the CamelExchangeAdapter

processExchangeAdapter

public boolean processExchangeAdapter(CamelExchangeAdapter exchange,
                                      org.apache.camel.AsyncCallback callback)
INTERNAL API Processes the CamelExchangeAdapter. This method is blocking when the exchange is inOnly. The method returns true if it executed synchronously/blocking.

Parameters:
exchange - the CamelExchangeAdapter
callback - the callback
Returns:
(doneSync) true to continue execute synchronously, false to continue being executed asynchronously