Package org.frankframework.jms
Class AbstractJmsMessageBrowser<M,J extends jakarta.jms.Message>
java.lang.Object
org.frankframework.jndi.JndiBase
org.frankframework.jms.JMSFacade
org.frankframework.jms.AbstractJmsMessageBrowser<M,J>
- Type Parameters:
M
- the payload message type as used by IMessageBrowser.J
- the physical JMS message to carry the payload.
- All Implemented Interfaces:
HasPhysicalDestination
,IConfigurable
,IConfigurationAware
,IMessageBrowser<M>
,INamedObject
,IScopeProvider
,IXAEnabled
,org.springframework.beans.factory.Aware
,org.springframework.context.ApplicationContextAware
- Direct Known Subclasses:
JmsBrowser
,JmsTransactionalStorage
public abstract class AbstractJmsMessageBrowser<M,J extends jakarta.jms.Message>
extends JMSFacade
implements IMessageBrowser<M>
Basic browser of JMS Messages.
- Author:
- Johan Verrips
-
Nested Class Summary
Nested classes/interfaces inherited from class org.frankframework.jms.JMSFacade
JMSFacade.AcknowledgeMode, JMSFacade.DeliveryMode, JMSFacade.DestinationType, JMSFacade.MessageClass, JMSFacade.SubscriberType
Nested classes/interfaces inherited from interface org.frankframework.core.IMessageBrowser
IMessageBrowser.HideMethod, IMessageBrowser.SortOrder, IMessageBrowser.StorageType
-
Field Summary
Fields inherited from class org.frankframework.jms.JMSFacade
JMS_MESSAGECLASS_KEY, messagingSource
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbrowseJmsMessage
(String messageId) boolean
containsCorrelationId
(String correlationId) boolean
containsMessageId
(String originalMessageId) Check if the storage contains message with the given original messageId (as passed to storeMessage).void
deleteMessage
(String messageId) Deletes the message.protected jakarta.jms.Message
protected jakarta.jms.Message
protected String
getCombinedSelector
(String messageId) protected String
getCombinedSelector
(Map<String, String> selectors) getContext
(String messageId) Retrieves the message context as an iteratorItem.Gets an enumeration of messages.getIterator
(Date startTime, Date endTime, IMessageBrowser.SortOrder order) getJmsMessage
(String messageId) int
long
void
setHideMethod
(IMessageBrowser.HideMethod hideMethod) (Only used when hideRegex is not empty) Specifies the way to hidevoid
setHideRegex
(String hideRegex) Regular expression to mask strings in the errorStore/logStore.void
setTimeout
(long newTimeOut) Timeout in milliseconds for receiving a message from the queuevoid
setTimeOut
(long newTimeOut) Deprecated.Methods inherited from class org.frankframework.jms.JMSFacade
checkTransactionManagerValidity, closeSession, configure, createBytesMessage, createMessage, createMessage, createSession, createTextMessage, extractMessage, extractMessageBody, getAcknowledgeMode, getAuthAlias, getConnectionFactoryFactory, getConnectionFactoryInfo, getConnectionFactoryName, getContext, getCorrelationIdMaxLength, getCorrelationIdToHexPrefix, getDestination, getDestination, getDestinationName, getDestinationType, getDomain, getJmsMessagingSource, getLogPrefix, getMessageClass, getMessageConsumer, getMessageConsumer, getMessageConsumerForCorrelationId, getMessageProducer, getMessageSelector, getMessageTimeToLive, getMessagingSource, getMessagingSourceFactory, getPhysicalDestinationName, getPhysicalDestinationShortName, getPhysicalDestinationShortName, getProxiedDestinationNames, getQueueConnectionFactoryName, getSubscriberType, getTopicConnectionFactoryName, getTxManager, isCorrelationIdToHex, isJmsTransacted, isLookupDestination, isPersistent, isSessionsArePooled, isTransacted, isUseTopicFunctions, logMessageDetails, send, send, send, send, send, send, send, sendByQueue, sendByTopic, setAcknowledgeMode, setAuthAlias, setConnectionFactoryFactory, setCorrelationIdMaxLength, setCorrelationIdToHex, setCorrelationIdToHexPrefix, setDestinationName, setDestinationType, setJmsTransacted, setLookupDestination, setMessageClass, setMessageCorrelationID, setMessageSelector, setMessageTimeToLive, setPersistent, setProxiedDestinationNames, setQueueConnectionFactoryName, setSubscriberType, setTopicConnectionFactoryName, setTransacted, setTxManager, start, stop, toString
Methods inherited from class org.frankframework.jndi.JndiBase
getApplicationContext, getAuthentication, getConfigurationClassLoader, getContext, getCredentials, getInitialContextFactoryName, getJmsRealmName, getJndiAuthAlias, getJndiContextPrefix, getJndiEnv, getJndiProperties, getName, getPrincipal, getProviderURL, getSecurityProtocol, getUrlPkgPrefixes, setApplicationContext, setAuthentication, setCredentials, setInitialContextFactoryName, setJmsRealm, setJndiAuthAlias, setJndiContextPrefix, setJndiProperties, setName, setPrincipal, setProviderURL, setSecurityProtocol, setUrlPkgPrefixes
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.frankframework.core.IMessageBrowser
browseMessage
Methods inherited from interface org.frankframework.core.IXAEnabled
isTransacted
-
Constructor Details
-
AbstractJmsMessageBrowser
public AbstractJmsMessageBrowser() -
AbstractJmsMessageBrowser
-
-
Method Details
-
getIterator
Description copied from interface:IMessageBrowser
Gets an enumeration of messages. This includes setting up connections, sessions etc.- Specified by:
getIterator
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
getIterator
public IMessageBrowsingIterator getIterator(Date startTime, Date endTime, IMessageBrowser.SortOrder order) throws ListenerException - Specified by:
getIterator
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
containsMessageId
Description copied from interface:IMessageBrowser
Check if the storage contains message with the given original messageId (as passed to storeMessage).- Specified by:
containsMessageId
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
containsCorrelationId
- Specified by:
containsCorrelationId
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
getMessageCount
- Specified by:
getMessageCount
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
getJmsMessage
- Throws:
ListenerException
-
getContext
Description copied from interface:IMessageBrowser
Retrieves the message context as an iteratorItem. The result can be used in the methods above that use an iteratorItem. Use this method as try-with-resources to close the connections.- Specified by:
getContext
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
browseJmsMessage
- Throws:
ListenerException
-
doBrowse
- Throws:
ListenerException
-
doBrowse
protected jakarta.jms.Message doBrowse(String selectorKey, String selectorValue) throws ListenerException - Throws:
ListenerException
-
deleteMessage
Description copied from interface:IMessageBrowser
Deletes the message.- Specified by:
deleteMessage
in interfaceIMessageBrowser<M>
- Throws:
ListenerException
-
getCombinedSelector
-
getCombinedSelector
-
setTimeOut
@Deprecated(since="8.1") @ConfigurationWarning("Use attribute timeout instead") public void setTimeOut(long newTimeOut) Deprecated.usesetTimeout(long)
insteadTimeout in milliseconds for receiving a message from the queue- Default value
- 3000
-
setTimeout
public void setTimeout(long newTimeOut) Timeout in milliseconds for receiving a message from the queue- Default value
- 3000
-
getTimeout
public long getTimeout() -
getSelector
-
getHideRegex
- Specified by:
getHideRegex
in interfaceIMessageBrowser<M>
-
setHideRegex
Description copied from interface:IMessageBrowser
Regular expression to mask strings in the errorStore/logStore. Every character between to the strings in this expression will be replaced by a '*'.
For example, the regular expression (?<=<party>).*?(?=</party>) will replace every character between keys <party> and </party>
When no hideRegex is configured on the errorStore / logStore but is configured on theReceiver.setHideRegex(String)
, then the Receiver's hideRegex is used for the errorStore / logStore.- Specified by:
setHideRegex
in interfaceIMessageBrowser<M>
-
getHideMethod
- Specified by:
getHideMethod
in interfaceIMessageBrowser<M>
-
setHideMethod
Description copied from interface:IMessageBrowser
(Only used when hideRegex is not empty) Specifies the way to hide- Specified by:
setHideMethod
in interfaceIMessageBrowser<M>
-
setTimeout(long)
instead