public class JdbcTableListener<M> extends JdbcListener<M> implements IProvidesMessageBrowsers<M>
JdbcListener.MessageFieldType
HasStatistics.Action
connection
Constructor and Description |
---|
JdbcTableListener() |
Modifier and Type | Method and Description |
---|---|
protected RawMessageWrapper<M> |
changeProcessState(Connection connection,
RawMessageWrapper<M> rawMessage,
ProcessState toState,
String reason) |
void |
configure()
configure() is called once at startup of the framework in the configure() method
of the owner of this listener. |
protected String |
createUpdateStatusQuery(String fieldValue,
String additionalSetClause) |
IMessageBrowser<M> |
getMessageBrowser(ProcessState state)
returns a
browser of messages that are in ProcessState 'state', and are stored in a
storage managed by the listener itself (as opposed to a storage configured as a messageLog or errorStorage in the configuration). |
String |
getPhysicalDestinationName()
Returns the name and location of the database that this objects operates on.
|
String |
getStatusValue(ProcessState state) |
IMessageBrowser.StorageType |
getStorageType(ProcessState state) |
void |
setCommentField(String commentField)
(optional) Field used to store the reason of the last change of the statusField
|
void |
setMaxCommentLength(int maxCommentLength)
(optional) Maximum length of strings to be stored in commentField, or -1 for unlimited
|
void |
setOrderField(String string)
(optional) Comma separated list of fields determining the order in which messages are processed
|
void |
setSelectCondition(String string)
Additional condition for a row to belong to this TableListener.
|
void |
setStatusField(String fieldname)
Field containing the status of the message.
|
void |
setStatusValueAvailable(String string)
(optional) Value of statusField indicating row is available to be processed.
|
void |
setStatusValueError(String string)
Value of statusField indicating the processing of the row resulted in an error
|
void |
setStatusValueHold(String string)
Value of status field indicating message is on Hold, temporarily
|
void |
setStatusValueInProcess(String string)
Value of status field indicating is being processed.
|
void |
setStatusValueProcessed(String string)
Value of status field indicating row is processed OK
|
void |
setTableAlias(String string)
Alias of the table, that can be used in selectCondition
|
void |
setTableName(String string)
Name of the table to be used
|
void |
setTimestampField(String fieldname)
(optional) Field used to store the date and time of the last change of the statusField
|
afterMessageProcessed, changeProcessState, close, closeThread, convertQuery, execute, extractMessage, extractRawMessage, getKeyFromRawMessage, getRawMessage, getRawMessage, getUpdateStatusQuery, hasRawMessageAvailable, hasRawMessageAvailable, knownProcessStates, open, openThread, setBlobCharset, setBlobsCompressed, setBlobSmartGet, setCorrelationIdField, setKeyField, setMessageField, setMessageFieldType, setMessageIdField, setPeekQuery, setPeekUntransacted, setSelectQuery, setSqlDialect, setTrace, setUpdateStatusQuery, targetProcessStates
getAuthAlias, getConnection, getConnectionWithTimeout, getDatasource, getDatasourceInfo, getDatasourceName, getDbmsSupport, getLogPrefix, getPassword, 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, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
changeProcessState, knownProcessStates, targetProcessStates
isPeekUntransacted
getName, setName
getApplicationContext, getName
getConfigurationClassLoader
setApplicationContext
getDomain
public void configure() throws ConfigurationException
IListener
configure()
is called once at startup of the framework in the configure()
method
of the owner of this listener.
Purpose of this method is to reduce creating connections to databases etc. in the IPullingListener.getRawMessage(Map)
method.
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 IListener<M>
configure
in class JdbcListener<M>
ConfigurationException
protected String createUpdateStatusQuery(String fieldValue, String additionalSetClause)
protected RawMessageWrapper<M> changeProcessState(Connection connection, RawMessageWrapper<M> rawMessage, ProcessState toState, String reason) throws ListenerException
changeProcessState
in class JdbcListener<M>
ListenerException
public IMessageBrowser<M> getMessageBrowser(ProcessState state)
IProvidesMessageBrowsers
browser
of messages that are in ProcessState 'state', and are stored in a
storage managed by the listener itself (as opposed to a storage configured as a messageLog or errorStorage in the configuration).getMessageBrowser
in interface IProvidesMessageBrowsers<M>
public String getStatusValue(ProcessState state)
public IMessageBrowser.StorageType getStorageType(ProcessState state)
public String getPhysicalDestinationName()
JdbcFacade
getPhysicalDestinationName
in interface HasPhysicalDestination
getPhysicalDestinationName
in class JdbcFacade
HasPhysicalDestination.getPhysicalDestinationName()
public void setTableName(String string)
public void setTableAlias(String string)
public void setStatusField(String fieldname)
public void setOrderField(String string)
public void setTimestampField(String fieldname)
public void setCommentField(String commentField)
public void setMaxCommentLength(int maxCommentLength)
public void setStatusValueAvailable(String string)
public void setStatusValueError(String string)
public void setStatusValueProcessed(String string)
public void setStatusValueInProcess(String string)
public void setStatusValueHold(String string)
public void setSelectCondition(String string)
Copyright © 2023 Frank!Framework. All rights reserved.