Record Class JmsResultFactory<T extends JmsAttributes>
java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.message.JmsResultFactory<T>
public record JmsResultFactory<T extends JmsAttributes>(JmsAttributesBuilderFactory builderFactory)
extends Record
Factory class for creating an Operation
Result based on a JMS Message- Since:
- 1.0
-
Constructor Summary
ConstructorsConstructorDescriptionJmsResultFactory(JmsAttributesBuilderFactory builderFactory) Creates an instance of aJmsResultFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebuilderFactoryrecord component.Creates an emptyResultcreateResult(jakarta.jms.Message jmsMessage, JmsSpecification specification, String contentType, String encoding, String ackId) Creates aResultfrom a JMSMessagebased on the current configurationsfinal booleanIndicates whether some other object is "equal to" this one.static JmsResultFactory<?>final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
JmsResultFactory
Creates an instance of aJmsResultFactoryrecord class.- Parameters:
builderFactory- the value for thebuilderFactoryrecord component
-
-
Method Details
-
getInstance
-
createResult
public org.mule.runtime.extension.api.runtime.operation.Result<Object,T> createResult(jakarta.jms.Message jmsMessage, JmsSpecification specification, String contentType, String encoding, String ackId) throws IOException, jakarta.jms.JMSException Creates aResultfrom a JMSMessagebased on the current configurations- Parameters:
jmsMessage- the JMSMessageto convertspecification- theJmsSpecificationused to obtain theMessagecontentType- the contentType of theMessagecontentencoding- the encoding of theMessagecontentackId- the ID required to perform an ACK on theSessiontheMessagebelongs to- Returns:
- an Operation
Resultcontaining the content, headers and properties of the originalMessage - Throws:
IOExceptionjakarta.jms.JMSException
-
createEmptyResult
Creates an emptyResult- Returns:
- an Operation
Resultcontaining the anullpayload and no attributes
-
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). -
builderFactory
Returns the value of thebuilderFactoryrecord component.- Returns:
- the value of the
builderFactoryrecord component
-