Record Class MessageConsumerFactory
java.lang.Object
java.lang.Record
org.mule.jms.commons.internal.source.polling.MessageConsumerFactory
public record MessageConsumerFactory(String destination, String selector, ConsumerType consumerType, JmsConfig jmsConfig)
extends Record
JmsMessageConsumer factory pattern implementation.- Since:
- 1.4.0
-
Constructor Summary
ConstructorsConstructorDescriptionMessageConsumerFactory(String destination, String selector, ConsumerType consumerType, JmsConfig jmsConfig) Creates an instance of aMessageConsumerFactoryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconsumerTyperecord component.createConsumer(JmsConnection connection, JmsSession session) Returns the value of thedestinationrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thejmsConfigrecord component.selector()Returns the value of theselectorrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MessageConsumerFactory
public MessageConsumerFactory(String destination, String selector, ConsumerType consumerType, JmsConfig jmsConfig) Creates an instance of aMessageConsumerFactoryrecord class.- Parameters:
destination- the value for thedestinationrecord componentselector- the value for theselectorrecord componentconsumerType- the value for theconsumerTyperecord componentjmsConfig- the value for thejmsConfigrecord component
-
-
Method Details
-
createConsumer
public JmsMessageConsumer createConsumer(JmsConnection connection, JmsSession session) throws jakarta.jms.JMSException - Throws:
jakarta.jms.JMSException
-
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). -
destination
Returns the value of thedestinationrecord component.- Returns:
- the value of the
destinationrecord component
-
selector
Returns the value of theselectorrecord component.- Returns:
- the value of the
selectorrecord component
-
consumerType
Returns the value of theconsumerTyperecord component.- Returns:
- the value of the
consumerTyperecord component
-
jmsConfig
Returns the value of thejmsConfigrecord component.- Returns:
- the value of the
jmsConfigrecord component
-