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
ConstructorsConstructorDescriptionJmsPublish(JmsSessionManager jmsSessionManager, org.mule.runtime.api.scheduler.Scheduler scheduler) Creates an instance of aJmsPublishrecord class. -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static booleanisConnectionBrokenException(Throwable throwable) Returns the value of thejmsSessionManagerrecord component.voidpublish(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 aMessageto a JMSDestinationorg.mule.runtime.api.scheduler.SchedulerReturns the value of theschedulerrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JmsPublish
public JmsPublish(JmsSessionManager jmsSessionManager, org.mule.runtime.api.scheduler.Scheduler scheduler) Creates an instance of aJmsPublishrecord class.- Parameters:
jmsSessionManager- the value for thejmsSessionManagerrecord componentscheduler- the value for theschedulerrecord 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, throws JmsExtensionExceptionVoid> completionCallback) Operation that allows the user to send aMessageto a JMSDestination- Parameters:
config- the currentDefaultJmsProducerConfigconnection- the currentJmsConnectiondestination- the name of theDestinationwhere theMessageshould be sentdestinationType- theDestinationTypeof thedestinationmessageBuilder- theDefaultJmsMessageBuilderused to create theMessageto be sentoverrides- Parameter Group with overriding parameters from the configurationtransactionalAction- 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 notcorrelationInfo- the current message's correlation info- Throws:
JmsExtensionException- if an error occurs trying to publish a message
-
isConnectionBrokenException
-
dispose
public void dispose()- Specified by:
disposein interfaceorg.mule.runtime.api.lifecycle.Disposable
-
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). -
jmsSessionManager
Returns the value of thejmsSessionManagerrecord component.- Returns:
- the value of the
jmsSessionManagerrecord component
-
scheduler
public org.mule.runtime.api.scheduler.Scheduler scheduler()Returns the value of theschedulerrecord component.- Returns:
- the value of the
schedulerrecord component
-