Class UntypedProducerActor

  • All Implemented Interfaces:
    Actor, CamelSupport, ProducerSupport

    public abstract class UntypedProducerActor
    extends UntypedActor
    implements ProducerSupport
    Called before the message is sent to the endpoint specified by getEndpointUri. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subclasses.
    • Constructor Detail

      • UntypedProducerActor

        public UntypedProducerActor()
    • Method Detail

      • camel

        protected Camel camel()
        Description copied from interface: CamelSupport
        INTERNAL API Returns a Camel trait which provides access to the CamelExtension.
        Specified by:
        camel in interface CamelSupport
        Returns:
        (undocumented)
      • endpointUri

        public final java.lang.String endpointUri()
        Description copied from interface: ProducerSupport
        Returns the Camel endpoint URI to produce messages to.
        Specified by:
        endpointUri in interface ProducerSupport
        Returns:
        (undocumented)
      • getActivation

        public Activation getActivation()
        ''Java API'': Returns the Activation interface that can be used to wait on activation or de-activation of Camel endpoints.
        Returns:
        the Activation interface
      • getCamelContext

        public org.apache.camel.impl.DefaultCamelContext getCamelContext()
        Returns the CamelContext.
        Returns:
        (undocumented)
      • getEndpointUri

        public abstract java.lang.String getEndpointUri()
        Returns the Camel endpoint URI to produce messages to.
        Returns:
        (undocumented)
      • getProducerTemplate

        public org.apache.camel.ProducerTemplate getProducerTemplate()
        Returns the ProducerTemplate.
        Returns:
        (undocumented)
      • isOneway

        public boolean isOneway()
        If set to false (default), this producer expects a response message from the Camel endpoint. If set to true, this producer communicates with the Camel endpoint with an in-only message exchange pattern (fire and forget).
        Returns:
        (undocumented)
      • onReceive

        public final void onReceive​(java.lang.Object message)
        Default implementation of UntypedActor.onReceive
        Specified by:
        onReceive in class UntypedActor
        Parameters:
        message - (undocumented)
      • onRouteResponse

        public void onRouteResponse​(java.lang.Object message)
        Called after a response was received from the endpoint specified by endpointUri. The response is passed as argument. By default, this method sends the response back to the original sender if oneway is false. If oneway is true, nothing is done. This method may be overridden by subclasses (e.g. to forward responses to another actor).
        Parameters:
        message - (undocumented)
      • onTransformOutgoingMessage

        public java.lang.Object onTransformOutgoingMessage​(java.lang.Object message)
      • onTransformResponse

        public java.lang.Object onTransformResponse​(java.lang.Object message)
        Called before the response message is sent to original sender. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subclasses.
        Parameters:
        message - (undocumented)
        Returns:
        (undocumented)
      • oneway

        public final boolean oneway()
        Description copied from interface: ProducerSupport
        If set to false (default), this producer expects a response message from the Camel endpoint. If set to true, this producer initiates an in-only message exchange with the Camel endpoint (fire and forget).
        Specified by:
        oneway in interface ProducerSupport
        Returns:
        (undocumented)
      • routeResponse

        public final void routeResponse​(java.lang.Object msg)
        Description copied from interface: ProducerSupport
        Called after a response was received from the endpoint specified by endpointUri. The response is passed as argument. By default, this method sends the response back to the original sender if oneway is false. If oneway is true, nothing is done. This method may be overridden by subtraits or subclasses (e.g. to forward responses to another actor).
        Specified by:
        routeResponse in interface ProducerSupport
        Parameters:
        msg - (undocumented)
      • transformOutgoingMessage

        public final java.lang.Object transformOutgoingMessage​(java.lang.Object msg)
        Description copied from interface: ProducerSupport
        Called before the message is sent to the endpoint specified by endpointUri. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subtraits or subclasses.
        Specified by:
        transformOutgoingMessage in interface ProducerSupport
        Parameters:
        msg - (undocumented)
        Returns:
        (undocumented)
      • transformResponse

        public final java.lang.Object transformResponse​(java.lang.Object msg)
        Description copied from interface: ProducerSupport
        Called before the response message is sent to the original sender. The original message is passed as argument. By default, this method simply returns the argument but may be overridden by subtraits or subclasses.
        Specified by:
        transformResponse in interface ProducerSupport
        Parameters:
        msg - (undocumented)
        Returns:
        (undocumented)