public class SchedulerSender extends SenderWithParametersBase
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
SchedulerSender() |
Modifier and Type | Method and Description |
---|---|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
SchedulerHelper |
getSchedulerHelper() |
boolean |
isSynchronous()
When
true , the result of sendMessage is the reply of the request. |
void |
open()
This method will be called to start the sender.
|
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
void |
setCronExpressionPattern(String string)
expression that generates the cron trigger
|
void |
setJavaListener(String string)
java listener to be called when scheduler trigger fires
|
void |
setJobGroup(String string)
job group in which the new trigger is to be created (optional)
|
void |
setJobNamePattern(String string)
pattern that leads to the name of the registered trigger(optional)
|
void |
setSchedulerHelper(SchedulerHelper helper) |
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
close, createBean, getLogPrefix, getName, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
public void configure() throws ConfigurationException
ISender
configure()
is called once at startup of the framework in the configure method of the owner of this sender.
Purpose of this method is to check whether the static configuration of the sender is correct.
As much as possible class-instantiating should take place in the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class SenderWithParametersBase
ConfigurationException
public void open() throws SenderException
ISender
sendMessage()
method.open
in interface ISender
open
in class SenderBase
SenderException
public boolean isSynchronous()
ISender
true
, the result of sendMessage is the reply of the request.isSynchronous
in interface ISender
isSynchronous
in class SenderBase
public SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the reply-message | the messageId of the message sent |
the correlationID specified with sendMessage() | may be ignored | is sent with the message |
a {link TimeOutException} | may be thrown if a timeout occurs waiting for a reply | should not be expected |
Multiple objects may try to call this method at the same time, from different threads.
Implementations of this method should therefore be thread-safe, or synchronized
.
SenderException
public void setCronExpressionPattern(String string)
public void setJobGroup(String string)
public void setJobNamePattern(String string)
public void setJavaListener(String string)
public SchedulerHelper getSchedulerHelper()
public void setSchedulerHelper(SchedulerHelper helper)
Copyright © 2023 Frank!Framework. All rights reserved.