Class CompositeSender
java.lang.Object
org.frankframework.senders.AbstractSender
org.frankframework.senders.AbstractSenderWithParameters
org.frankframework.components.plugins.CompositeSender
- All Implemented Interfaces:
AdapterAware, FrankElement, HasApplicationContext, HasName, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, NameAware, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle
public class CompositeSender
extends AbstractSenderWithParameters
implements org.springframework.beans.factory.InitializingBean, AdapterAware
Pipe that allows you to call a Frank!Framework Plugin. Just like a FrankSender this pipe calls a sub-process, or sub-adapter.
As not all session variables are copied over, if you wish to propagate a value, you can do so by using Parameters.
For example:
<ForEachChildElementPipe name="callPluginAsSender" ...>
<CompositeSender name="plugin" plugin="demo-plugin" ref="demo-test-part.xml">
<Param name="inject-me" value="im a value" />
<Param name="inject-me-too" sessionKey="originalMessage" />
</CompositeSender>
</ForEachChildElementPipe>
- Author:
- Niels Meijer
- See Also:
-
Field Summary
Fields inherited from class AbstractSenderWithParameters
parameterNamesMustBeUnique, paramListFields inherited from class AbstractSender
log -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidConfigure this component.@NonNull SenderResultsendMessage(@NonNull Message message, @NonNull PipeLineSession parentSession) Send a message to some destination (as configured in the Sender object).voidFunctional name of the plugin to load.voidFile in the Plugin which contains the<PipelinePart />to call.voidstart()This method will be called to start the sender.voidstop()Stop/close the sender and deallocate resources.Methods inherited from class AbstractSenderWithParameters
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueListMethods inherited from class AbstractSender
createBean, getLogPrefix, getName, isRunning, setApplicationContext, setNameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AdapterAware
setAdapterMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface FrankElement
addConfigWarningMethods inherited from interface HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface ISender
isSynchronous, sendMessageOrThrow
-
Constructor Details
-
CompositeSender
-
CompositeSender
-
-
Method Details
-
afterPropertiesSet
-
configure
Description copied from interface:IConfigurableConfigure 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:
configurein interfaceIConfigurable- Overrides:
configurein classAbstractSenderWithParameters- Throws:
ConfigurationException- in case it was not able to configure the component.
-
start
public void start()Description copied from interface:ISenderThis 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:
startin interfaceISender- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classAbstractSender
-
stop
public void stop()Description copied from interface:ISenderStop/close the sender and deallocate resources.- Specified by:
stopin interfaceISender- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classAbstractSender
-
sendMessage
public @NonNull SenderResult sendMessage(@NonNull Message message, @NonNull PipeLineSession parentSession) throws SenderException Description copied from interface:ISenderSend 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 ISender.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.- Specified by:
sendMessagein interfaceISender- Throws:
SenderException
-
setPlugin
Functional name of the plugin to load. -
setRef
File in the Plugin which contains the<PipelinePart />to call. Defaults to "Configuration.xml" but can be any XML file.
-