Class FailoverForwardingService

  • All Implemented Interfaces:
    ManagedLifecycle, org.apache.synapse.task.Task

    public class FailoverForwardingService
    extends Object
    implements org.apache.synapse.task.Task, ManagedLifecycle
    This task is responsible for forwarding a request to a given message store.
    • Constructor Detail

      • FailoverForwardingService

        public FailoverForwardingService​(MessageProcessor messageProcessor,
                                         SynapseEnvironment synapseEnvironment,
                                         long threshouldInterval,
                                         boolean isDeactivatedAtStartup)
    • Method Detail

      • execute

        public void execute()
        Starts the execution of this task which grabs a message from the message queue and dispatch it to a given endpoint.
        Specified by:
        execute in interface org.apache.synapse.task.Task
      • dispatch

        public void dispatch​(MessageContext messageContext)
        Sends the message to a given message store.
        Parameters:
        messageContext - synapse MessageContext to be sent
      • sendThroughFaultSeq

        public void sendThroughFaultSeq​(MessageContext msgCtx)
        Sending the out message through the fault sequence.
        Parameters:
        msgCtx - Synapse MessageContext to be sent through the fault sequence.
      • sendThroughDeactivateSeq

        public void sendThroughDeactivateSeq​(MessageContext msgCtx)
        Sending the out message through the deactivate sequence.
        Parameters:
        msgCtx - Synapse MessageContext to be sent through the deactivate sequence.
      • terminate

        public boolean terminate()
        Terminates the job of the message processor.
        Returns:
        true if the job is terminated successfully, false otherwise.
      • isInitialized

        public boolean isInitialized()
        Checks whether this TaskService is properly initialized or not.
        Returns:
        true if this TaskService is properly initialized. false otherwise.
      • destroy

        public void destroy()
        Description copied from interface: ManagedLifecycle
        This method should implement the destroying of the implemented parts of the configuration.
        Specified by:
        destroy in interface ManagedLifecycle