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>
,ISenderWithParameters
- All Known Implementing Classes:
BlockEnabledSenderBase
,CollectorSenderBase
,CommandSender
,DelaySender
,DirectQuerySender
,EchoSender
,FixedQuerySender
,FixedResultSender
,FrankSender
,HttpSender
,HttpSenderBase
,IbisJavaSender
,IbisLocalSender
,JavascriptSender
,JdbcIteratingPipeBase.MixedQuerySender
,JdbcQuerySenderBase
,JdbcSenderBase
,JmsSender
,JsonXsltSender
,LdapSender
,LogSender
,MailSender
,MailSenderBase
,MessageStoreSender
,MongoDbSender
,MultipartHttpSender
,ParallelSenders
,ReconnectSenderWrapper
,ReloadSender
,RestSender
,ResultSet2FileSender
,SchedulerSender
,SenderBase
,SenderSeries
,SenderWithParametersBase
,SenderWrapper
,SenderWrapperBase
,SendGridSender
,SendMessageJob.SendMessageJobSender
,ShadowSender
,StoredProcedureQuerySender
,WebServiceSender
,XmlJmsBrowserSender
,XmlQuerySender
,XmlValidatorSender
,XsltSender
,ZipWriterSender
Marks an implementation as responsible for sending a message to some destination.
- Author:
- Gerrit van Brakel
-
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Stop/close the sender and deallocate resources.void
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.void
open()
This method will be called to start the sender.sendMessage
(Message message, PipeLineSession session) Send a message to some destination (as configured in the Sender object).default Message
sendMessageOrThrow
(Message message, PipeLineSession session) 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
-
open
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.- Throws:
SenderException
-
close
Stop/close the sender and deallocate resources.- Throws:
SenderException
-
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.
-