Package com.trafficparrot.sdk.messaging
Class JmsResponse
java.lang.Object
com.trafficparrot.sdk.messaging.JmsResponse
- All Implemented Interfaces:
Comparable<JmsResponse>
- Direct Known Subclasses:
JmsResponse
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal Stringfinal MessageBodyTypefinal Destinationfinal Optional<DestinationLookup>final longfinal Optional<jakarta.jms.Message>AJmsResponseTransformercan return a jakarta.jms.Message object instead of just transforming the mapping values.final Stringfinal Stringfinal com.github.tomakehurst.wiremock.extension.Parametersstatic final Stringfinal List<JmsProperty>final StringContent resolved frombodyFileNameat load time.final Optional<javax.jms.Message>Deprecated.final String -
Constructor Summary
ConstructorsModifierConstructorDescriptionJmsResponse(Destination destination, Object object) JmsResponse(Destination destination, String text) protectedJmsResponse(Destination destination, String jmsResponseTransformerClassName, com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters, String text, String bodyFileName, MessageBodyType bodyType, String jmsMessageType, List<? extends JmsProperty> properties, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<javax.jms.Message> responseMessage, Optional<jakarta.jms.Message> jakartaResponseMessage, String resolvedText) JmsResponse(Destination destination, String jmsResponseTransformerClassName, com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters, String text, String bodyFileName, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<javax.jms.Message> responseMessage) JmsResponse(Destination destination, String jmsResponseTransformerClassName, Object object) JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text) JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType) JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds) JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, List<JmsProperty> properties, long fixedDelayInMilliseconds) -
Method Summary
Modifier and TypeMethodDescriptionstatic JmsResponsebase64BytesResponse(Destination destination, byte[] bytes) static JmsResponsebase64BytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) intcompareTo(JmsResponse other) The response body content to send: the file-resolvedresolvedTextwhen set, otherwise the inlinetext.booleanstatic JmsResponseprintableCharactersBytesResponse(Destination destination, byte[] bytes) static JmsResponseprintableCharactersBytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) toString()voidvalidate()static JmsResponsewithJakartaResponseMessage(Destination destination, jakarta.jms.Message jakartaMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) withResolvedText(String resolvedText) Returns a copy withresolvedTextset (the content read frombodyFileNameat load time).
-
Field Details
-
NO_TRANSFORMER
- See Also:
-
destination
-
jmsResponseTransformerClassName
-
jmsResponseTransformerParameters
public final com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters -
text
-
bodyFileName
-
bodyType
-
jmsMessageType
-
properties
-
destinationLookup
-
fixedDelayMilliseconds
public final long fixedDelayMilliseconds -
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
Deprecated.UsejakartaResponseMessageinstead. This field is kept for backward compatibility with old javax.jms customer plugins. -
jakartaResponseMessage
AJmsResponseTransformercan return a jakarta.jms.Message object instead of just transforming the mapping values. The framework reads this field first; if empty, falls back toresponseMessagefor old plugins.
-
-
Constructor Details
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters, String text, String bodyFileName, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<javax.jms.Message> responseMessage) -
JmsResponse
protected JmsResponse(Destination destination, String jmsResponseTransformerClassName, com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters, String text, String bodyFileName, MessageBodyType bodyType, String jmsMessageType, List<? extends JmsProperty> properties, Long fixedDelayInMilliseconds, Optional<DestinationLookup> destinationLookup, Optional<javax.jms.Message> responseMessage, Optional<jakarta.jms.Message> jakartaResponseMessage, String resolvedText) -
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds) -
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, List<JmsProperty> properties, long fixedDelayInMilliseconds) -
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType) -
JmsResponse
-
JmsResponse
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, Object object) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
JmsResponse
public JmsResponse(Destination destination, Object object) throws com.fasterxml.jackson.core.JsonProcessingException - Throws:
com.fasterxml.jackson.core.JsonProcessingException
-
-
Method Details
-
base64BytesResponse
-
base64BytesResponse
public static JmsResponse base64BytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) -
printableCharactersBytesResponse
-
printableCharactersBytesResponse
public static JmsResponse printableCharactersBytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) -
withJakartaResponseMessage
public static JmsResponse withJakartaResponseMessage(Destination destination, jakarta.jms.Message jakartaMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) -
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. -
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<JmsResponse>
-
hasTransformer
public boolean hasTransformer() -
validate
- Throws:
IOException
-
jakartaResponseMessageinstead.