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
    Processes the exchange. Calls the synchronous version of the method and waits for the result (blocking). param: exchange the exchange to process
    • Field Summary

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

        log
      • Fields inherited from class org.apache.camel.support.ServiceSupport

        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)  
      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 org.apache.camel.support.ServiceSupport

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