Class SimpleJdbcListener
java.lang.Object
org.frankframework.jdbc.JdbcFacade
org.frankframework.jdbc.SimpleJdbcListener
- All Implemented Interfaces:
FrankElement, HasApplicationContext, HasName, HasPhysicalDestination, IConfigurable, IListener<String>, IPullingListener<String>, IScopeProvider, IXAEnabled, NameAware, ConfigurableLifecycle, org.springframework.beans.factory.Aware, org.springframework.context.ApplicationContextAware, org.springframework.context.Lifecycle, org.springframework.context.Phased, org.springframework.context.SmartLifecycle
@Deprecated(forRemoval=true,
since="10.2")
@ConfigurationWarning("Please use JdbcTableListener (also non-locking) to perform a count query or let it directly return messages.")
public class SimpleJdbcListener
extends JdbcFacade
implements IPullingListener<String>
Deprecated, for removal: This API element is subject to removal in a future version.
Database Listener that returns a count of messages available, but does not perform any locking or
other management of processing messages in parallel.
- Author:
- Peter Leeuwenburgh
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ConnectionDeprecated, for removal: This API element is subject to removal in a future version.protected static final StringDeprecated, for removal: This API element is subject to removal in a future version.Fields inherited from class JdbcFacade
logFields inherited from interface org.springframework.context.SmartLifecycle
DEFAULT_PHASE -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionvoidafterMessageProcessed(PipeLineResult processResult, RawMessageWrapper<String> rawMessage, PipeLineSession pipeLineSession) Deprecated, for removal: This API element is subject to removal in a future version.Called to perform actions (like committing or sending a reply) after a message has been processed by the Pipeline.voidcloseThread(@NonNull Map<String, Object> threadContext) Deprecated, for removal: This API element is subject to removal in a future version.Finalizes a message receiving thread.voidDeprecated, for removal: This API element is subject to removal in a future version.Configure this component.protected voidexecute(Connection conn, String query) Deprecated, for removal: This API element is subject to removal in a future version.protected voidexecute(Connection conn, String query, String parameter) Deprecated, for removal: This API element is subject to removal in a future version.protected ResultSetexecuteQuery(Connection conn, String query) Deprecated, for removal: This API element is subject to removal in a future version.extractMessage(@NonNull RawMessageWrapper<String> rawMessage, @NonNull Map<String, Object> context) Deprecated, for removal: This API element is subject to removal in a future version.Extracts data from message obtained fromIPullingListener.getRawMessage(Map)orIPushingListener.wrapRawMessage(Object, PipeLineSession).protected RawMessageWrapper<String> getRawMessage(Connection conn, Map<String, Object> threadContext) Deprecated, for removal: This API element is subject to removal in a future version.@Nullable RawMessageWrapper<String> getRawMessage(@NonNull Map<String, Object> threadContext) Deprecated, for removal: This API element is subject to removal in a future version.Retrieves messages from queue or other channel, but does no processing on it.Deprecated, for removal: This API element is subject to removal in a future version.booleanisTrace()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Prepares a thread for receiving messages.voidsetSelectQuery(String string) Deprecated, for removal: This API element is subject to removal in a future version.count query that returns the number of available records. when there are available records the pipeline is activatedvoidsetTrace(boolean trace) Deprecated, for removal: This API element is subject to removal in a future version.voidstart()Deprecated, for removal: This API element is subject to removal in a future version.Prepares the listener for receiving messages.voidstop()Deprecated, for removal: This API element is subject to removal in a future version.Close all resources used for listening.Methods inherited from class JdbcFacade
getConnection, getConnectionWithTimeout, getDatasource, getDatasourceName, getDbmsSupport, getLogPrefix, getPassword, getPhysicalDestinationName, isConnectionsArePooled, isRunning, isTransacted, setAuthAlias, setConnectionsArePooled, setDatasourceName, setDbmsSupportFactory, setName, setPassword, setTransacted, setUsernameMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, 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 org.springframework.context.SmartLifecycle
isPauseable, stop
-
Field Details
-
KEYWORD_SELECT_COUNT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
connection
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
SimpleJdbcListener
public SimpleJdbcListener()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
configure
Deprecated, for removal: This API element is subject to removal in a future version.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.
-
start
public void start()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IListenerPrepares the listener for receiving messages.start()is called once each time the listener is started.- Specified by:
startin interfaceConfigurableLifecycle- Specified by:
startin interfaceIListener<String>- Specified by:
startin interfaceorg.springframework.context.Lifecycle- Overrides:
startin classJdbcFacade
-
stop
public void stop()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IListenerClose all resources used for listening. Called once each time the listener is stopped.- Specified by:
stopin interfaceIListener<String>- Specified by:
stopin interfaceorg.springframework.context.Lifecycle- Overrides:
stopin classJdbcFacade
-
openThread
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IPullingListenerPrepares a thread for receiving messages. Called once for each thread that will listen for messages.- Specified by:
openThreadin interfaceIPullingListener<String>- Returns:
- the threadContext for this thread. The threadContext is a Map in which
thread-specific data can be stored. May not be
null, must be a mutable map type. - Throws:
ListenerException
-
closeThread
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IPullingListenerFinalizes a message receiving thread. Called once for each thread that listens for messages, just beforeIListener.stop()is called.- Specified by:
closeThreadin interfaceIPullingListener<String>- Throws:
ListenerException
-
getRawMessage
public @Nullable RawMessageWrapper<String> getRawMessage(@NonNull Map<String, Object> threadContext) throws ListenerExceptionDeprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IPullingListenerRetrieves messages from queue or other channel, but does no processing on it. Multiple objects may try to call this method at the same time, from different threads. Implementations of this method should therefore be thread-safe, orsynchronized.Any thread-specific properties should be stored in and retrieved from the threadContext.
- Specified by:
getRawMessagein interfaceIPullingListener<String>- Throws:
ListenerException
-
getRawMessage
protected RawMessageWrapper<String> getRawMessage(Connection conn, Map<String, Object> threadContext) throws ListenerExceptionDeprecated, for removal: This API element is subject to removal in a future version.- Throws:
ListenerException
-
extractMessage
public Message extractMessage(@NonNull RawMessageWrapper<String> rawMessage, @NonNull Map<String, Object> context) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IListenerExtracts data from message obtained fromIPullingListener.getRawMessage(Map)orIPushingListener.wrapRawMessage(Object, PipeLineSession). May also extract other parameters from the message and put those into the context.- Specified by:
extractMessagein interfaceIListener<String>- Parameters:
rawMessage- TheRawMessageWrapperfrom which to extract theMessage.context- Context to populate. Either aPipeLineSessionor aMapthreadContext depending on caller.- Returns:
- input
Messagefor adapter.
-
executeQuery
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
ListenerException
-
afterMessageProcessed
public void afterMessageProcessed(PipeLineResult processResult, RawMessageWrapper<String> rawMessage, PipeLineSession pipeLineSession) Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:IListenerCalled to perform actions (like committing or sending a reply) after a message has been processed by the Pipeline.- Specified by:
afterMessageProcessedin interfaceIListener<String>
-
execute
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
ListenerException
-
execute
Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
ListenerException
-
setSelectQuery
Deprecated, for removal: This API element is subject to removal in a future version.count query that returns the number of available records. when there are available records the pipeline is activated -
getSelectQuery
Deprecated, for removal: This API element is subject to removal in a future version. -
isTrace
public boolean isTrace()Deprecated, for removal: This API element is subject to removal in a future version. -
setTrace
public void setTrace(boolean trace) Deprecated, for removal: This API element is subject to removal in a future version.
-