Package com.trafficparrot.sdk.ibmmq
Class IbmMqResponse
java.lang.Object
com.trafficparrot.sdk.ibmmq.IbmMqResponse
- All Implemented Interfaces:
Comparable<IbmMqResponse>
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal IbmMqCharacterSetfinal Destinationfinal Optional<DestinationLookup>final longfinal IbmMqMessageFormatfinal Stringstatic final Stringfinal Stringfinal Stringfinal StringContent resolved frombodyFileNameat load time.final Optional<com.ibm.mq.MQMessage>AIbmMqResponseTransformercan return anMQMessageobject instead of just transforming the mapping values.final String -
Constructor Summary
ConstructorsConstructorDescriptionIbmMqResponse(Destination destination, com.ibm.mq.MQMessage responseMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) IbmMqResponse(Destination destination, String text) IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage) IbmMqResponse(Destination destination, com.ibm.mq.MQMessage responseMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) IbmMqResponse(Destination destination, String text) IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, Long fixedDelayInMilliseconds, IbmMqCharacterSet characterSet, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage) IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage) IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, String bodyFileName, Long fixedDelayInMilliseconds, IbmMqCharacterSet characterSet, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage, String replyToQueueManagerName, String replyToQueueName) -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(IbmMqResponse other) com.ibm.mq.MQMessagecreateMessage(byte[] correlationId, String replyToQueueManagerNameHeader, String replyToQueueNameHeader) The response body content to send: the file-resolvedresolvedTextwhen set, otherwise the inlinetext.booleanbooleantoString()booleanvoidvalidate()withResolvedText(String resolvedText) Returns a copy withresolvedTextset (the content read frombodyFileNameat load time).static IbmMqResponsewithResponseMessage(Destination destination, com.ibm.mq.MQMessage responseMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) Static: builds a new response that sendsresponseMessageas it is, as the(Destination, MQMessage, long, Optional)constructor does, taking the destination lookup asDestinationLookuprather than the deprecated IBM MQ enum.static voidwriteMessage(com.ibm.mq.MQMessage mqMessage, IbmMqMessageFormat format, String text) static voidwriteMessage(com.ibm.mq.MQMessage mqMessage, IbmMqMessageFormat format, String text, int characterSet)
-
Field Details
-
NO_TRANSFORMER
- See Also:
-
destination
-
ibmMqResponseTransformerClassName
-
format
-
text
-
bodyFileName
-
fixedDelayMilliseconds
public final long fixedDelayMilliseconds -
characterSet
-
destinationLookup
-
replyToQueueManagerName
-
replyToQueueName
-
resolvedText
Content resolved frombodyFileNameat load time. Held here rather than intextso the persisted model keepsbodyFileNameset andtextnull (non-destructive).transientso the filesystem mapper never writes it to disk; set only viawithResolvedText(String)and read viaeffectiveText(). The web-UI mapper re-includes it (via a mix-in) so the editor can display the content. -
responseMessage
AIbmMqResponseTransformercan return anMQMessageobject instead of just transforming the mapping values.
-
-
Constructor Details
-
IbmMqResponse
public IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, String bodyFileName, Long fixedDelayInMilliseconds, IbmMqCharacterSet characterSet, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage, String replyToQueueManagerName, String replyToQueueName) -
IbmMqResponse
public IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, Long fixedDelayInMilliseconds, IbmMqCharacterSet characterSet, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage) -
IbmMqResponse
public IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage) -
IbmMqResponse
-
IbmMqResponse
public IbmMqResponse(Destination destination, com.ibm.mq.MQMessage responseMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) -
IbmMqResponse
public IbmMqResponse(Destination destination, String ibmMqResponseTransformerClassName, IbmMqMessageFormat format, String text, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<com.ibm.mq.MQMessage> responseMessage) -
IbmMqResponse
-
IbmMqResponse
public IbmMqResponse(Destination destination, com.ibm.mq.MQMessage responseMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup)
-
-
Method Details
-
withResponseMessage
public static IbmMqResponse withResponseMessage(Destination destination, com.ibm.mq.MQMessage responseMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) Static: builds a new response that sendsresponseMessageas it is, as the(Destination, MQMessage, long, Optional)constructor does, taking the destination lookup asDestinationLookuprather than the deprecated IBM MQ enum.Optional.of(USE_MAPPING_RESPONSE_DESTINATION)sends it todestination, ignoring the reply-to queue name the request carries;Optional.empty()or the default constant send it to that reply-to queue when the request names one, else todestination. -
createMessage
public com.ibm.mq.MQMessage createMessage(byte[] correlationId, String replyToQueueManagerNameHeader, String replyToQueueNameHeader) throws IOException - Throws:
IOException
-
writeMessage
public static void writeMessage(com.ibm.mq.MQMessage mqMessage, IbmMqMessageFormat format, String text) throws IOException - Throws:
IOException
-
writeMessage
public static void writeMessage(com.ibm.mq.MQMessage mqMessage, IbmMqMessageFormat format, String text, int characterSet) throws IOException - Throws:
IOException
-
withResolvedText
Returns a copy withresolvedTextset (the content read frombodyFileNameat load time). Every persisted field is preserved so a subsequent save re-writesbodyFileNamewith nulltext, keeping the sidecar reference intact. -
effectiveText
The response body content to send: the file-resolvedresolvedTextwhen set, otherwise the inlinetext. -
validate
- Throws:
IOException
-
useDefaultDestinationLookup
public boolean useDefaultDestinationLookup() -
forceMappingDestinationLookup
public boolean forceMappingDestinationLookup() -
hasTransformer
public boolean hasTransformer() -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<IbmMqResponse>
-