Class SynchronousDelegateProducer

  • All Implemented Interfaces:
    AutoCloseable, org.apache.camel.EndpointAware, org.apache.camel.IsSingleton, org.apache.camel.Processor, org.apache.camel.Producer, org.apache.camel.Service

    public class SynchronousDelegateProducer
    extends Object
    implements org.apache.camel.Producer
    To process the delegated producer in synchronous mode.

    This is used to enforce asynchronous producers to run in synchronous mode when it has been configured to do so.

    This delegate allows the component developers easily to support their existing asynchronous producer to behave synchronously by wrapping their producer in this synchronous delegate.

    • Constructor Detail

      • SynchronousDelegateProducer

        public SynchronousDelegateProducer​(org.apache.camel.Producer producer)
    • Method Detail

      • getEndpoint

        public org.apache.camel.Endpoint getEndpoint()
        Specified by:
        getEndpoint in interface org.apache.camel.EndpointAware
      • process

        public void process​(org.apache.camel.Exchange exchange)
                     throws Exception
        Specified by:
        process in interface org.apache.camel.Processor
        Throws:
        Exception
      • init

        public void init()
        Specified by:
        init in interface org.apache.camel.Service
      • start

        public void start()
        Specified by:
        start in interface org.apache.camel.Service
      • stop

        public void stop()
        Specified by:
        stop in interface org.apache.camel.Service
      • isSingleton

        public boolean isSingleton()
        Specified by:
        isSingleton in interface org.apache.camel.IsSingleton