public class ForwardingService extends java.lang.Object implements org.apache.synapse.task.Task, ManagedLifecycle
Constructor and Description |
---|
ForwardingService(MessageProcessor messageProcessor,
BlockingMsgSender sender,
SynapseEnvironment synapseEnvironment,
long threshouldInterval) |
ForwardingService(MessageProcessor messageProcessor,
BlockingMsgSender sender,
SynapseEnvironment synapseEnvironment,
long thresholdInterval,
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 endpoint.
|
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()
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.
|
void |
sendThroughReplySeq(MessageContext outCtx)
Sending the out message through the reply sequence.
|
boolean |
terminate()
Terminates the job of the message processor.
|
public ForwardingService(MessageProcessor messageProcessor, BlockingMsgSender sender, SynapseEnvironment synapseEnvironment, long threshouldInterval)
public ForwardingService(MessageProcessor messageProcessor, BlockingMsgSender sender, SynapseEnvironment synapseEnvironment, long thresholdInterval, boolean isDeactivatedAtStartup)
public void execute()
execute
in interface org.apache.synapse.task.Task
public void init(SynapseEnvironment se) throws SynapseException
ManagedLifecycle
init
in interface ManagedLifecycle
se
- SynapseEnvironment to be used for initializationSynapseException
public MessageContext fetch() throws StoreForwardException
MessageContext
of the last message received from the
store.StoreForwardException
- on an issue fetching a message from store. Here
all connections to internal store will be closed. Also all connections
made by consumer to poll messages will be closedpublic 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 void sendThroughReplySeq(MessageContext outCtx)
outCtx
- Synapse out MessageContext
to be sent through the
reply 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-2021 Apache Software Foundation. All Rights Reserved.