Package org.frankframework.core
Interface ISender
- All Superinterfaces:
org.springframework.context.ApplicationContextAware
,org.springframework.beans.factory.Aware
,IConfigurable
,IConfigurationAware
,INamedObject
,IScopeProvider
- All Known Subinterfaces:
IBlockEnabledSender<H>
,ICorrelatedSender
,ISenderWithParameters
- All Known Implementing Classes:
AbstractBlockEnabledSender
,AbstractCollectorSender
,AbstractHttpSender
,AbstractJdbcQuerySender
,AbstractJdbcSender
,AbstractMailSender
,AbstractSender
,AbstractSenderWithParameters
,AbstractSenderWrapper
,CommandSender
,DelaySender
,DirectQuerySender
,EchoSender
,FixedQuerySender
,FixedResultSender
,FrankSender
,HttpSender
,IbisJavaSender
,IbisLocalSender
,JavascriptSender
,JdbcIteratingPipeBase.MixedQuerySender
,JmsSender
,JsonXsltSender
,LdapSender
,LogSender
,MailSender
,MessageStoreSender
,MongoDbSender
,MultipartHttpSender
,ParallelSenders
,ReconnectSenderWrapper
,ReloadSender
,RestSender
,ResultSet2FileSender
,SchedulerSender
,SenderSeries
,SenderWrapper
,SendGridSender
,SendMessageJob.SendMessageJobSender
,ShadowSender
,StoredProcedureQuerySender
,WebServiceSender
,XmlJmsBrowserSender
,XmlQuerySender
,XmlValidatorSender
,XsltSender
,ZipWriterSender
@FrankDocGroup(SENDER)
@EnterpriseIntegrationPattern(ENDPOINT)
public interface ISender
extends IConfigurable
Marks an implementation as responsible for sending a message to some destination.
- Author:
- Gerrit van Brakel
-
Method Summary
Modifier and TypeMethodDescriptionvoid
configure()
is called once at startup of the framework in the configure method of the owner of this sender.default boolean
consumesSessionVariable
(String sessionKey) returnstrue
if the sender or one of its children use the named session variable.default boolean
Whentrue
, the result of sendMessage is the reply of the request.sendMessage
(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).default Message
sendMessageOrThrow
(Message message, PipeLineSession session) void
start()
This method will be called to start the sender.void
stop()
Stop/close the sender and deallocate resources.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.IConfigurationAware
getApplicationContext, getName
Methods inherited from interface org.frankframework.core.INamedObject
getName, setName
Methods inherited from interface org.frankframework.core.IScopeProvider
getConfigurationClassLoader
-
Method Details
-
configure
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 theconfigure()
oropen()
method, to improve performance.- Specified by:
configure
in interfaceIConfigurable
- Throws:
ConfigurationException
-
start
void start()This method will be called to start the sender. After this method is called the sendMessage method may be called. Purpose of this method is to reduce creating connections to databases etc. in thesendMessage()
method. -
stop
void stop()Stop/close the sender and deallocate resources. -
isSynchronous
default boolean isSynchronous()Whentrue
, the result of sendMessage is the reply of the request. -
sendMessage
@Nonnull SenderResult sendMessage(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException Send a message to some destination (as configured in the Sender object). This method may only be called after theconfigure()
method is called.The following table shows the difference between synchronous and a-synchronous senders:
synchronous a-synchronous isSynchronous()
returnstrue
false
return value of sendMessage()
isthe 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
.- Throws:
SenderException
TimeoutException
-
sendMessageOrThrow
@Nonnull default Message sendMessageOrThrow(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException - Throws:
SenderException
TimeoutException
-
consumesSessionVariable
returnstrue
if the sender or one of its children use the named session variable. Callers can use this to determine if a message needs to be preserved.
-