Record Class JmsMessageListenerFactory<T extends DefaultJmsAttributes>
java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.source.push.JmsMessageListenerFactory<T>
public record JmsMessageListenerFactory<T extends DefaultJmsAttributes>(InternalAckMode ackMode, String encoding, String contentType, JmsConfig<?,?> config, JmsSessionManager sessionManager, JmsSupport jmsSupport, org.mule.runtime.extension.api.runtime.source.SourceCallback<Object,JmsAttributes> sourceCallback, org.mule.sdk.api.connectivity.ConnectionProvider<JmsTransactionalConnection> connectionProvider, JmsConnectionExceptionResolver exceptionResolver)
extends Record
Factory pattern implementation in charge of creating instances of
JmsMessageListener- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionJmsMessageListenerFactory(InternalAckMode ackMode, String encoding, String contentType, JmsConfig<?, ?> config, JmsSessionManager sessionManager, JmsSupport jmsSupport, org.mule.runtime.extension.api.runtime.source.SourceCallback<Object, JmsAttributes> sourceCallback, org.mule.sdk.api.connectivity.ConnectionProvider<JmsTransactionalConnection> connectionProvider, JmsConnectionExceptionResolver exceptionResolver) Creates a new factory with the common information that is shared betweenJmsMessageListenerof the sameJmsListener -
Method Summary
Modifier and TypeMethodDescriptionackMode()Returns the value of theackModerecord component.JmsConfig<?,?> config()Returns the value of theconfigrecord component.org.mule.sdk.api.connectivity.ConnectionProvider<JmsTransactionalConnection>Returns the value of theconnectionProviderrecord component.Returns the value of thecontentTyperecord component.createMessageListener(JmsSession session, JmsListenerLock jmsLock) Creates a newJmsMessageListenerwith a givenJmsSessionandJmsListenerLockto be able to synchronize the message dispatch.encoding()Returns the value of theencodingrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionResolverrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thejmsSupportrecord component.Returns the value of thesessionManagerrecord component.org.mule.runtime.extension.api.runtime.source.SourceCallback<Object,JmsAttributes> Returns the value of thesourceCallbackrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JmsMessageListenerFactory
public JmsMessageListenerFactory(InternalAckMode ackMode, String encoding, String contentType, JmsConfig<?, ?> config, JmsSessionManager sessionManager, JmsSupport jmsSupport, org.mule.runtime.extension.api.runtime.source.SourceCallback<Object, JmsAttributes> sourceCallback, org.mule.sdk.api.connectivity.ConnectionProvider<JmsTransactionalConnection> connectionProvider, JmsConnectionExceptionResolver exceptionResolver) Creates a new factory with the common information that is shared betweenJmsMessageListenerof the sameJmsListener- Parameters:
ackMode- Acknowledgement mode to use to consume the messagesencoding- Default encoding if the consumed message doesn't provide onecontentType- Default contentType if the consumed message doesn't provide oneconfig- JMS extension configurationsessionManager- manager to store the session and ACK ID of each dispatched messagejmsSupport- JMS Support that communicates the used specificationsourceCallback- callback use to dispatch theMessageto the mule flowconnectionProvider- JMS Connection provider which will provideJmsConnectionto bind into theSourceCallbackContextexceptionResolver- Exception resolver used in case some broker specific conditions qualify as a connection issue
-
-
Method Details
-
createMessageListener
Creates a newJmsMessageListenerwith a givenJmsSessionandJmsListenerLockto be able to synchronize the message dispatch.- Parameters:
session- the session to create the JMS ConsumerjmsLock- the lock to use to synchronize the message dispatch- Returns:
- An instance of a
JmsMessageListenerready to listen for messages and dispatch them to a Mule Flow
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
ackMode
Returns the value of theackModerecord component.- Returns:
- the value of the
ackModerecord component
-
encoding
Returns the value of theencodingrecord component.- Returns:
- the value of the
encodingrecord component
-
contentType
Returns the value of thecontentTyperecord component.- Returns:
- the value of the
contentTyperecord component
-
config
Returns the value of theconfigrecord component.- Returns:
- the value of the
configrecord component
-
sessionManager
Returns the value of thesessionManagerrecord component.- Returns:
- the value of the
sessionManagerrecord component
-
jmsSupport
Returns the value of thejmsSupportrecord component.- Returns:
- the value of the
jmsSupportrecord component
-
sourceCallback
public org.mule.runtime.extension.api.runtime.source.SourceCallback<Object,JmsAttributes> sourceCallback()Returns the value of thesourceCallbackrecord component.- Returns:
- the value of the
sourceCallbackrecord component
-
connectionProvider
public org.mule.sdk.api.connectivity.ConnectionProvider<JmsTransactionalConnection> connectionProvider()Returns the value of theconnectionProviderrecord component.- Returns:
- the value of the
connectionProviderrecord component
-
exceptionResolver
Returns the value of theexceptionResolverrecord component.- Returns:
- the value of the
exceptionResolverrecord component
-