Package akka.camel.internal.component
Class ActorProducer
- java.lang.Object
-
- org.apache.camel.support.ServiceSupport
-
- org.apache.camel.impl.DefaultProducer
-
- akka.camel.internal.component.ActorProducer
-
- All Implemented Interfaces:
org.apache.camel.AsyncProcessor
,org.apache.camel.EndpointAware
,org.apache.camel.IsSingleton
,org.apache.camel.Processor
,org.apache.camel.Producer
,org.apache.camel.Service
,org.apache.camel.ShutdownableService
,org.apache.camel.StatefulService
,org.apache.camel.SuspendableService
public class ActorProducer extends org.apache.camel.impl.DefaultProducer implements org.apache.camel.AsyncProcessor
Processes the exchange. Calls the synchronous version of the method and waits for the result (blocking). param: exchange the exchange to process
-
-
Constructor Summary
Constructors Constructor Description ActorProducer(ActorEndpoint endpoint, Camel camel)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ActorEndpoint
endpoint()
void
process(org.apache.camel.Exchange exchange)
boolean
process(org.apache.camel.Exchange exchange, org.apache.camel.AsyncCallback callback)
Processes the message exchange.void
processExchangeAdapter(CamelExchangeAdapter exchange)
INTERNAL API Processes theCamelExchangeAdapter
boolean
processExchangeAdapter(CamelExchangeAdapter exchange, org.apache.camel.AsyncCallback callback)
INTERNAL API Processes theCamelExchangeAdapter
.-
Methods inherited from class org.apache.camel.impl.DefaultProducer
createExchange, createExchange, createExchange, doStart, doStop, getEndpoint, isSingleton, toString
-
Methods inherited from class org.apache.camel.support.ServiceSupport
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
-
-
-
-
Constructor Detail
-
ActorProducer
public ActorProducer(ActorEndpoint endpoint, Camel camel)
-
-
Method Detail
-
endpoint
public ActorEndpoint endpoint()
-
process
public void process(org.apache.camel.Exchange exchange)
- Specified by:
process
in interfaceorg.apache.camel.Processor
-
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.- Specified by:
process
in interfaceorg.apache.camel.AsyncProcessor
- Parameters:
exchange
- the message exchangecallback
- 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 theCamelExchangeAdapter
- Parameters:
exchange
- theCamelExchangeAdapter
-
processExchangeAdapter
public boolean processExchangeAdapter(CamelExchangeAdapter exchange, org.apache.camel.AsyncCallback callback)
INTERNAL API Processes theCamelExchangeAdapter
. This method is blocking when the exchange is inOnly. The method returns true if it executed synchronously/blocking.- Parameters:
exchange
- theCamelExchangeAdapter
callback
- the callback- Returns:
- (doneSync) true to continue execute synchronously, false to continue being executed asynchronously
-
-