Package org.frankframework.senders
Class ReconnectSenderWrapper
java.lang.Object
org.frankframework.senders.AbstractSender
org.frankframework.senders.AbstractSenderWithParameters
org.frankframework.senders.AbstractSenderWrapper
org.frankframework.senders.ReconnectSenderWrapper
- All Implemented Interfaces:
ICacheEnabled<String,
,String> FrankElement
,HasApplicationContext
,HasName
,IConfigurable
,IScopeProvider
,ISender
,ISenderWithParameters
,IWithParameters
,NameAware
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
,org.springframework.context.Lifecycle
Wrapper for senders, that opens the wrapped sender at runtime before each sender action, and closes it afterwards.
This prevents (long) open connections inside Senders and possible connection failures.
Example:
<SenderPipe>
<ReconnectSenderWrapper>
<EchoSender myAttribute="myValue" />
</ReconnectSenderWrapper>
</SenderPipe>
- Author:
- Niels Meijer
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class org.frankframework.senders.AbstractSenderWrapper
configurationMetrics, senderWrapperProcessor
Fields inherited from class org.frankframework.senders.AbstractSenderWithParameters
parameterNamesMustBeUnique, paramList
Fields inherited from class org.frankframework.senders.AbstractSender
log
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Configure this component.doSendMessage
(Message message, PipeLineSession session) protected boolean
boolean
Whentrue
, the result of sendMessage is the reply of the request.void
specification of sender to send messages withvoid
start()
This method will be called to start the sender.Methods inherited from class org.frankframework.senders.AbstractSenderWrapper
getCache, getGetInputFromFixedValue, getGetInputFromSessionKey, getStoreInputInSessionKey, getStoreResultInSessionKey, isPreserveInput, sendMessage, setCache, setConfigurationMetrics, setGetInputFromFixedValue, setGetInputFromSessionKey, setName, setPreserveInput, setSenderWrapperProcessor, setStoreInputInSessionKey, setStoreResultInSessionKey, stop
Methods inherited from class org.frankframework.senders.AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
Methods inherited from class org.frankframework.senders.AbstractSender
createBean, getApplicationContext, getConfigurationClassLoader, getLogPrefix, getName, isRunning, setApplicationContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContext
Methods inherited from interface org.frankframework.core.HasApplicationContext
getApplicationContext, getConfigurationClassLoader
Methods inherited from interface org.frankframework.core.ISender
sendMessageOrThrow
-
Constructor Details
-
ReconnectSenderWrapper
public ReconnectSenderWrapper()
-
-
Method Details
-
isSenderConfigured
protected boolean isSenderConfigured()- Specified by:
isSenderConfigured
in classAbstractSenderWrapper
-
configure
Description copied from interface:IConfigurable
Configure this component.configure()
is called once at startup of the framework in the configure method of the owner of thisIConfigurable
. Purpose of this method is to check whether the static configuration of the object is correct. As much as possible class-instantiating should take place in theconfigure()
, to improve performance.In the case of a container, this will propagate the configure signal to all components that apply.
- Specified by:
configure
in interfaceIConfigurable
- Overrides:
configure
in classAbstractSenderWrapper
- Throws:
ConfigurationException
- in case it was not able to configure the component.
-
start
public void start()Description copied from interface:ISender
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.- Specified by:
start
in interfaceISender
- Specified by:
start
in interfaceorg.springframework.context.Lifecycle
- Overrides:
start
in classAbstractSenderWrapper
-
doSendMessage
public SenderResult doSendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException - Specified by:
doSendMessage
in classAbstractSenderWrapper
- Throws:
SenderException
TimeoutException
-
isSynchronous
public boolean isSynchronous()Description copied from interface:ISender
Whentrue
, the result of sendMessage is the reply of the request. -
setSender
specification of sender to send messages with
-