Record Class JmsMessageProducer

java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.publish.JmsMessageProducer
All Implemented Interfaces:
AutoCloseable

public record JmsMessageProducer(JmsSupport jmsSupport, jakarta.jms.MessageProducer producer, boolean isTopic) extends Record implements AutoCloseable
Wrapper implementation of a JMS MessageProducer
Since:
1.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmsMessageProducer(JmsSupport jmsSupport, jakarta.jms.MessageProducer producer, boolean isTopic)
    Creates an instance of a JmsMessageProducer record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the isTopic record component.
    Returns the value of the jmsSupport record component.
    jakarta.jms.MessageProducer
    Returns the value of the producer record component.
    void
    publish(jakarta.jms.Message message, PublisherParameters overrides)
     
    void
    publish(jakarta.jms.Message message, PublisherParameters overrides, jakarta.jms.CompletionListener completionListener)
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • JmsMessageProducer

      public JmsMessageProducer(JmsSupport jmsSupport, jakarta.jms.MessageProducer producer, boolean isTopic)
      Creates an instance of a JmsMessageProducer record class.
      Parameters:
      jmsSupport - the value for the jmsSupport record component
      producer - the value for the producer record component
      isTopic - the value for the isTopic record component
  • Method Details

    • publish

      public void publish(jakarta.jms.Message message, PublisherParameters overrides) throws jakarta.jms.JMSException
      Throws:
      jakarta.jms.JMSException
    • publish

      public void publish(jakarta.jms.Message message, PublisherParameters overrides, jakarta.jms.CompletionListener completionListener) throws jakarta.jms.JMSException
      Throws:
      jakarta.jms.JMSException
    • close

      public void close() throws jakarta.jms.JMSException
      Specified by:
      close in interface AutoCloseable
      Throws:
      jakarta.jms.JMSException
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • jmsSupport

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

      public jakarta.jms.MessageProducer producer()
      Returns the value of the producer record component.
      Returns:
      the value of the producer record component
    • isTopic

      public boolean isTopic()
      Returns the value of the isTopic record component.
      Returns:
      the value of the isTopic record component