Record Class JmsPublish

java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.operation.JmsPublish
All Implemented Interfaces:
org.mule.runtime.api.lifecycle.Disposable

public record JmsPublish(JmsSessionManager jmsSessionManager, org.mule.runtime.api.scheduler.Scheduler scheduler) extends Record implements org.mule.runtime.api.lifecycle.Disposable
Operation that allows the user to send a message to a JMS Destination
Since:
1.0
  • Field Summary

    Fields inherited from interface org.mule.runtime.api.lifecycle.Disposable

    PHASE_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    JmsPublish(JmsSessionManager jmsSessionManager, org.mule.runtime.api.scheduler.Scheduler scheduler)
    Creates an instance of a JmsPublish 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.
    static boolean
     
    Returns the value of the jmsSessionManager record component.
    void
    publish(JmsConfig<?,?> config, JmsTransactionalConnection connection, String destination, DestinationTypeDescriptor destinationType, JmsMessageBuilder<?> messageBuilder, PublisherParameters overrides, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction, org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId, org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback)
    Operation that allows the user to send a Message to a JMS Destination
    org.mule.runtime.api.scheduler.Scheduler
    Returns the value of the scheduler record component.
    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

    • JmsPublish

      public JmsPublish(JmsSessionManager jmsSessionManager, org.mule.runtime.api.scheduler.Scheduler scheduler)
      Creates an instance of a JmsPublish record class.
      Parameters:
      jmsSessionManager - the value for the jmsSessionManager record component
      scheduler - the value for the scheduler record component
  • Method Details

    • publish

      @Throws(JmsPublisherErrorTypeProvider.class) public void publish(@Config JmsConfig<?,?> config, @Connection JmsTransactionalConnection connection, @Summary("The name of the Destination where the Message should be sent") String destination, @Optional(defaultValue="QUEUE") @Summary("The type of the Destination") DestinationTypeDescriptor destinationType, @Summary("A builder for the message that will be published") @ParameterGroup(name="Message",showInDsl=true) JmsMessageBuilder<?> messageBuilder, @ParameterGroup(name="Publish Configuration") PublisherParameters overrides, org.mule.runtime.extension.api.tx.OperationTransactionalAction transactionalAction, @ConfigOverride org.mule.runtime.extension.api.runtime.parameter.OutboundCorrelationStrategy sendCorrelationId, org.mule.runtime.extension.api.runtime.parameter.CorrelationInfo correlationInfo, org.mule.runtime.extension.api.runtime.process.CompletionCallback<Void,Void> completionCallback) throws JmsExtensionException
      Operation that allows the user to send a Message to a JMS Destination
      Parameters:
      config - the current DefaultJmsProducerConfig
      connection - the current JmsConnection
      destination - the name of the Destination where the Message should be sent
      destinationType - the DestinationType of the destination
      messageBuilder - the DefaultJmsMessageBuilder used to create the Message to be sent
      overrides - Parameter Group with overriding parameters from the configuration
      transactionalAction - Transactional Action for the operation. Indicates if the publish must be executed or not in a transaction.
      sendCorrelationId - options on whether to include an outbound correlation id or not
      correlationInfo - the current message's correlation info
      Throws:
      JmsExtensionException - if an error occurs trying to publish a message
    • isConnectionBrokenException

      public static boolean isConnectionBrokenException(Throwable throwable)
    • dispose

      public void dispose()
      Specified by:
      dispose in interface org.mule.runtime.api.lifecycle.Disposable
    • 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.
    • jmsSessionManager

      public JmsSessionManager jmsSessionManager()
      Returns the value of the jmsSessionManager record component.
      Returns:
      the value of the jmsSessionManager record component
    • scheduler

      public org.mule.runtime.api.scheduler.Scheduler scheduler()
      Returns the value of the scheduler record component.
      Returns:
      the value of the scheduler record component