public abstract class JdbcSenderBase<H> extends JdbcFacade implements IBlockEnabledSender<H>, IStreamingSender
HasStatistics.Action
Modifier and Type | Field and Description |
---|---|
protected Connection |
connection |
protected ParameterList |
paramList |
Constructor and Description |
---|
JdbcSenderBase() |
Modifier and Type | Method and Description |
---|---|
void |
addParameter(Parameter p) |
void |
close()
Stop/close the sender and deallocate resources.
|
void |
configure()
configure() is called once at startup of the framework in the configure method of the owner of this sender. |
ParameterList |
getParameterList() |
int |
getTimeout() |
void |
open()
This method will be called to start the sender.
|
SenderResult |
sendMessage(Message message,
PipeLineSession session)
Send a message to some destination (as configured in the Sender object).
|
void |
setTimeout(int i)
The number of seconds the driver will wait for a statement object to execute.
|
String |
toString() |
getAuthAlias, getConnection, getConnectionWithTimeout, getDatasource, getDatasourceInfo, getDatasourceName, getDbmsSupport, getLogPrefix, getPassword, getPhysicalDestinationName, getUsername, isConnectionsArePooled, isTransacted, iterateOverStatistics, setAuthAlias, setConnectionsArePooled, setDatasourceName, setDbmsSupportFactory, setJmsRealm, setPassword, setTransacted, setUsername
getContext, getJndiEnv, setAuthentication, setCredentials, setInitialContextFactoryName, setJndiAuthAlias, setJndiContextPrefix, setJndiProperties, setName, setPrincipal, setProviderURL, setSecurityProtocol, setUrlPkgPrefixes
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
closeBlock, openBlock, sendMessage
sendMessage
consumesSessionVariable
isSynchronous, sendMessageOrThrow
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
provideOutputStream, supportsOutputStreamPassThrough
getDomain
protected Connection connection
protected ParameterList paramList
public void addParameter(Parameter p)
addParameter
in interface IWithParameters
public ParameterList getParameterList()
getParameterList
in interface IWithParameters
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 JdbcFacade
ConfigurationException
public void open() throws SenderException
ISender
sendMessage()
method.open
in interface ISender
SenderException
public void close()
ISender
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
public void setTimeout(int i)
public int getTimeout()
Copyright © 2023 Frank!Framework. All rights reserved.