public class ForwardingService extends 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 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 mesage 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(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.
|
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 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 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–2018 Apache Software Foundation. All rights reserved.