public class FailoverForwardingService extends Object implements org.apache.synapse.task.Task, ManagedLifecycle
Constructor and Description |
---|
FailoverForwardingService(MessageProcessor messageProcessor,
SynapseEnvironment synapseEnvironment,
long threshouldInterval,
boolean isDeactivatedAtStartup) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
This method should implement the destroying of the
implemented parts of the configuration.
|
void |
dispatch(MessageContext messageContext)
Sends the message to a given message store.
|
void |
execute()
Starts the execution of this task which grabs a message from the message
queue and dispatch it to a given endpoint.
|
MessageContext |
fetch(MessageConsumer msgConsumer)
Receives the next message from the message store.
|
void |
init(SynapseEnvironment se)
This method should implement the initialization of the
implemented parts of the configuration.
|
boolean |
isInitialized()
Checks whether this TaskService is properly initialized or not.
|
void |
sendThroughDeactivateSeq(MessageContext msgCtx)
Sending the out message through the deactivate sequence.
|
void |
sendThroughFaultSeq(MessageContext msgCtx)
Sending the out message through the fault sequence.
|
boolean |
terminate()
Terminates the job of the message processor.
|
public FailoverForwardingService(MessageProcessor messageProcessor, SynapseEnvironment synapseEnvironment, long threshouldInterval, boolean isDeactivatedAtStartup)
public void execute()
execute
in interface org.apache.synapse.task.Task
public void init(SynapseEnvironment se)
ManagedLifecycle
init
in interface ManagedLifecycle
se
- SynapseEnvironment to be used for initializationpublic MessageContext fetch(MessageConsumer msgConsumer)
msgConsumer
- message consumerMessageContext
of the last message received from the
store.public void dispatch(MessageContext messageContext)
messageContext
- synapse MessageContext
to be sentpublic void sendThroughFaultSeq(MessageContext msgCtx)
msgCtx
- Synapse MessageContext
to be sent through the fault
sequence.public void sendThroughDeactivateSeq(MessageContext msgCtx)
msgCtx
- Synapse MessageContext
to be sent through the deactivate
sequence.public boolean terminate()
true
if the job is terminated successfully,
false
otherwise.public boolean isInitialized()
true
if this TaskService is properly initialized.
false
otherwise.public void destroy()
ManagedLifecycle
destroy
in interface ManagedLifecycle
Copyright © 2005–2018 Apache Software Foundation. All rights reserved.