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 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 between JmsMessageListener of the same JmsListener
      Parameters:
      ackMode - Acknowledgement mode to use to consume the messages
      encoding - Default encoding if the consumed message doesn't provide one
      contentType - Default contentType if the consumed message doesn't provide one
      config - JMS extension configuration
      sessionManager - manager to store the session and ACK ID of each dispatched message
      jmsSupport - JMS Support that communicates the used specification
      sourceCallback - callback use to dispatch the Message to the mule flow
      connectionProvider - JMS Connection provider which will provide JmsConnection to bind into the SourceCallbackContext
      exceptionResolver - Exception resolver used in case some broker specific conditions qualify as a connection issue
  • Method Details

    • createMessageListener

      public JmsMessageListener<?> createMessageListener(JmsSession session, JmsListenerLock jmsLock)
      Creates a new JmsMessageListener with a given JmsSession and JmsListenerLock to be able to synchronize the message dispatch.
      Parameters:
      session - the session to create the JMS Consumer
      jmsLock - the lock to use to synchronize the message dispatch
      Returns:
      An instance of a JmsMessageListener ready to listen for messages and dispatch them to a Mule Flow
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ackMode

      public InternalAckMode ackMode()
      Returns the value of the ackMode record component.
      Returns:
      the value of the ackMode record component
    • encoding

      public String encoding()
      Returns the value of the encoding record component.
      Returns:
      the value of the encoding record component
    • contentType

      public String contentType()
      Returns the value of the contentType record component.
      Returns:
      the value of the contentType record component
    • config

      public JmsConfig<?,?> config()
      Returns the value of the config record component.
      Returns:
      the value of the config record component
    • sessionManager

      public JmsSessionManager sessionManager()
      Returns the value of the sessionManager record component.
      Returns:
      the value of the sessionManager record component
    • jmsSupport

      public JmsSupport jmsSupport()
      Returns the value of the jmsSupport record component.
      Returns:
      the value of the jmsSupport record component
    • sourceCallback

      public org.mule.runtime.extension.api.runtime.source.SourceCallback<Object,JmsAttributes> sourceCallback()
      Returns the value of the sourceCallback record component.
      Returns:
      the value of the sourceCallback record component
    • connectionProvider

      public org.mule.sdk.api.connectivity.ConnectionProvider<JmsTransactionalConnection> connectionProvider()
      Returns the value of the connectionProvider record component.
      Returns:
      the value of the connectionProvider record component
    • exceptionResolver

      public JmsConnectionExceptionResolver exceptionResolver()
      Returns the value of the exceptionResolver record component.
      Returns:
      the value of the exceptionResolver record component