Class 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
    Sends the in-message of an exchange to an untyped actor, identified by an ActorEndpoint

    See Also:
    ActorComponent, ActorEndpoint
    • Field Summary

      • Fields inherited from class org.apache.camel.impl.DefaultProducer

      • Fields inherited from class

        shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 org.apache.camel.impl.DefaultProducer

        createExchange, createExchange, createExchange, doStart, doStop, getEndpoint, isSingleton, toString
      • Methods inherited from class

        doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspend
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.apache.camel.Service

        start, stop
    • Method Detail

      • 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).
        Specified by:
        process in interface org.apache.camel.Processor
        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.

        Specified by:
        process in interface org.apache.camel.AsyncProcessor
        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.
        (doneSync) true to continue execute synchronously, false to continue being executed asynchronously
      • 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.
        exchange - the CamelExchangeAdapter
        callback - the callback
        (doneSync) true to continue execute synchronously, false to continue being executed asynchronously