Class AbstractJdbcSender<H>
java.lang.Object
org.frankframework.jdbc.JdbcFacade
org.frankframework.jdbc.AbstractJdbcSender<H>
- All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasPhysicalDestination, IBlockEnabledSender<H>, IConfigurable, IScopeProvider, ISender, ISenderWithParameters, IWithParameters, NameAware, TransactionAware, ConfigurableLifecycle, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
- Direct Known Subclasses:
AbstractJdbcQuerySender
Base class for building JDBC-senders.
TODO: This class has only a single (abstract) subclass so it can be merged into the AbstractJdbcQuerySender
- Since:
- 4.2.h
- Author:
- Gerrit van Brakel
-
Field Summary
FieldsFields inherited from class JdbcFacade
logFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidConfigure this component.@NonNull ConnectionObtains a connection to the datasource.@NonNull ParameterListfinal @NonNull SenderResultsendMessage(@NonNull Message message, @NonNull PipeLineSession session) Send a message to some destination (as configured in the Sender object).voidsetTimeout(int i) The number of seconds the JDBC driver will wait for a statement object to execute.toString()Methods inherited from class JdbcFacade
convertQuery, getConnectionWithTimeout, getDatasource, getDatasourceName, getDbmsSupport, getLogPrefix, getPassword, getPhysicalDestinationName, isRunning, setAuthAlias, setBlobCharset, setBlobsCompressed, setBlobSmartGet, setDatasourceName, setDbmsSupportFactory, setName, setPassword, setSqlDialect, setUsername, start, stop, withConnection, withConnectionMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.context.ApplicationContextAware
setApplicationContextMethods inherited from interface ConfigurableLifecycle
getPhase, isAutoStartup, isConfiguredMethods inherited from interface FrankElement
addConfigWarningMethods inherited from interface HasApplicationContext
getApplicationContext, getConfigurationClassLoaderMethods inherited from interface IBlockEnabledSender
closeBlock, openBlock, sendMessageMethods inherited from interface ISender
isSynchronous, sendMessageOrThrow, start, stopMethods inherited from interface ISenderWithParameters
consumesSessionVariableMethods inherited from interface org.springframework.context.SmartLifecycle
isPauseable, stop
-
Field Details
-
paramList
-
-
Constructor Details
-
AbstractJdbcSender
protected AbstractJdbcSender()
-
-
Method Details
-
addParameter
- Specified by:
addParameterin interfaceIWithParameters
-
getParameterList
- Specified by:
getParameterListin interfaceIWithParameters
-
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 classJdbcFacade- Throws:
ConfigurationException- in case it was not able to configure the component.
-
getConnection
Description copied from class:JdbcFacadeObtains a connection to the datasource.- Overrides:
getConnectionin classJdbcFacade- Throws:
JdbcException
-
sendMessage
public final @NonNull SenderResult sendMessage(@NonNull Message message, @NonNull PipeLineSession session) throws SenderException, TimeoutException 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:
SenderExceptionTimeoutException
-
toString
-
setTimeout
public void setTimeout(int i) The number of seconds the JDBC driver will wait for a statement object to execute. If the limit is exceeded, a TimeoutException is thrown. A value of 0 means execution time is not limited- Default value
- 0
-