public abstract class StreamingSenderBase extends SenderWithParametersBase implements IStreamingSender
parameterNamesMustBeUnique, paramList
log
Constructor and Description |
---|
StreamingSenderBase() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canProvideOutputStream()
returns true when there are no parameters that require the input value or context
(or other side effects inhibiting providing an outputstream, to be determined by descendants)
|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
boolean |
supportsOutputStreamPassThrough()
Implementations should return
true when they do not require an OutputStream, but can
provide one to the preceding pipe if they are themselves provided with one from the next pipe. |
addParameter, checkStringAttributeOrParameter, consumesSessionVariable, getParameterList, getParameterOverriddenAttributeValue, getParameterOverriddenAttributeValue, getParameterValueList
close, createBean, getLogPrefix, getName, open, setApplicationContext, setName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
sendMessage
consumesSessionVariable
close, isSynchronous, open, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
addParameter, getParameterList
provideOutputStream
public void configure() throws ConfigurationException
ISender
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 the configure()
or open()
method, to improve performance.configure
in interface IConfigurable
configure
in interface ISender
configure
in class SenderWithParametersBase
ConfigurationException
public final SenderResult sendMessage(Message message, PipeLineSession session) throws SenderException, TimeoutException
ISender
configure()
method is called.
The following table shows the difference between synchronous and a-synchronous senders:
synchronous | a-synchronous | |
---|---|---|
ISender.isSynchronous() returns | true | false |
return value of sendMessage() is | the 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
.
sendMessage
in interface ISender
SenderException
TimeoutException
protected boolean canProvideOutputStream()
public boolean supportsOutputStreamPassThrough()
IOutputStreamingSupport
true
when they do not require an OutputStream, but can
provide one to the preceding pipe if they are themselves provided with one from the next pipe.supportsOutputStreamPassThrough
in interface IOutputStreamingSupport
Copyright © 2023 Frank!Framework. All rights reserved.