Package org.frankframework.core
Interface ISender
- All Superinterfaces:
org.springframework.context.ApplicationContextAware,org.springframework.beans.factory.Aware,FrankElement,HasApplicationContext,HasName,IConfigurable,IScopeProvider,NameAware
- All Known Subinterfaces:
IBlockEnabledSender<H>,ICorrelatedSender,ISapSender,ISenderWithParameters
- All Known Implementing Classes:
AbstractBlockEnabledSender,AbstractCollectorSender,AbstractFileSystemSender,AbstractHttpSender,AbstractJdbcQuerySender,AbstractJdbcSender,AbstractMailSender,AbstractSender,AbstractSenderWithParameters,AbstractSenderWrapper,Afm2EdiFactSender,AmazonS3Sender,AmqpSender,BisJmsSender,CmisHttpSender,CmisSender,CommandSender,DelaySender,DirectQuerySender,EchoSender,EsbJmsSender,ExchangeFileSystemSender,ExchangeFolderSender,FileSystemSenderWithAttachments,FixedQuerySender,FixedResultSender,FrankSender,FtpFileSystemSender,HttpSender,IbisJavaSender,IbisLocalSender,IdinSender,IdocSender,IdocSender,IdocSenderImpl,ImapSender,IMSSender,JavascriptSender,JdbcIteratingPipeBase.MixedQuerySender,JmsSender,JsonXsltSender,KafkaSender,LdapSender,LocalFileSystemSender,LogSender,MailSender,MessageStoreSender,MongoDbSender,MQSender,MqttSender,MsalClientAdapter,NetStorageSender,ParallelSenders,ReconnectSenderWrapper,ReloadSender,ResultSet2FileSender,Samba1Sender,Samba2Sender,SapSender,SapSender,SapSenderBase,SapSenderImpl,SenderSeries,SenderWrapper,SendGridSender,SendMessageJob.SendMessageJobSender,SftpFileSystemSender,ShadowSender,StoredProcedureQuerySender,WebServiceNtlmSender,WebServiceSender,XComSender,XfbSender,XmlJmsBrowserSender,XmlQuerySender,XmlValidatorSender,XsltSender,ZipWriterSender
@FrankDocGroup(SENDER)
@EnterpriseIntegrationPattern(ENDPOINT)
public interface ISender
extends IConfigurable, FrankElement, NameAware
Marks an implementation as responsible for sending a message to some destination.
- Author:
- Gerrit van Brakel
-
Method Summary
Modifier and TypeMethodDescriptiondefault booleanconsumesSessionVariable(String sessionKey) returnstrueif the sender or one of its children use the named session variable.default booleanWhentrue, 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 MessagesendMessageOrThrow(Message message, PipeLineSession session) voidstart()This method will be called to start the sender.voidstop()Stop/close the sender and deallocate resources.Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface org.frankframework.core.FrankElement
addConfigWarningMethods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface org.frankframework.core.IConfigurable
configure
-
Method Details
-
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()returnstruefalsereturn 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:
SenderExceptionTimeoutException
-
sendMessageOrThrow
@Nonnull default Message sendMessageOrThrow(@Nonnull Message message, @Nonnull PipeLineSession session) throws SenderException, TimeoutException - Throws:
SenderExceptionTimeoutException
-
consumesSessionVariable
returnstrueif 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.
-