Package com.trafficparrot.sdk.jms
Class JmsResponse
java.lang.Object
com.trafficparrot.sdk.messaging.JmsResponse
com.trafficparrot.sdk.jms.JmsResponse
- All Implemented Interfaces:
Comparable<JmsResponse>
Deprecated.
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal List<JmsProperty>Deprecated.Hides the inheritedpropertieswith its old element type.Fields inherited from class com.trafficparrot.sdk.messaging.JmsResponse
bodyFileName, bodyType, destination, destinationLookup, fixedDelayMilliseconds, jakartaResponseMessage, jmsMessageType, jmsResponseTransformerClassName, jmsResponseTransformerParameters, NO_TRANSFORMER, resolvedText, responseMessage, text -
Constructor Summary
ConstructorsConstructorDescriptionJmsResponse(Destination destination, Object object) Deprecated.Creates a response that uses no transformer and whose body is a Java object, from thecom.trafficparrot.sdk.jmsdestination type.JmsResponse(Destination destination, String text) Deprecated.Creates a text response that uses no transformer, from thecom.trafficparrot.sdk.jmsdestination type.JmsResponse(Destination destination, String jmsResponseTransformerClassName, com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds, Optional<?> destinationLookup, Optional<javax.jms.Message> responseMessage) Deprecated.Creates a response with an inline body and every other field, from thecom.trafficparrot.sdk.jmstypes.JmsResponse(Destination destination, String jmsResponseTransformerClassName, Object object) Deprecated.Creates a response whose body is a Java object, from thecom.trafficparrot.sdk.jmsdestination type.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text) Deprecated.Creates a text response, from thecom.trafficparrot.sdk.jmsdestination type.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType) Deprecated.Creates a response with an inline body of a given type, from thecom.trafficparrot.sdk.jmstypes.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties, a delay and a JMS message type, from thecom.trafficparrot.sdk.jmstypes.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, List<JmsProperty> properties, long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties and a delay, from thecom.trafficparrot.sdk.jmstypes.JmsResponse(Destination destination, Object object) Deprecated.Creates a response that uses no transformer and whose body is a Java object.JmsResponse(Destination destination, String text) Deprecated.Creates a text response that uses no transformer.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) Deprecated.Creates a response with every field a mapping file can set, as the constructor ofJmsResponsewith these parameters does.JmsResponse(Destination destination, String jmsResponseTransformerClassName, Object object) Deprecated.Creates a response whose body is a Java object.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text) Deprecated.Creates a text response with no JMS properties and no delay.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType) Deprecated.Creates a response with an inline body of a given type, no JMS properties and no delay.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties, a delay and a JMS message type.JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, List<JmsProperty> properties, long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties and a delay. -
Method Summary
Modifier and TypeMethodDescriptionstatic JmsResponsebase64BytesResponse(Destination destination, byte[] bytes) Deprecated.A response that uses no transformer and whose body is these bytes, held as Base64, from thecom.trafficparrot.sdk.jmsdestination type.static JmsResponsebase64BytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held as Base64, from thecom.trafficparrot.sdk.jmsdestination type.static JmsResponsebase64BytesResponse(Destination destination, byte[] bytes) Deprecated.A response that uses no transformer and whose body is these bytes, held as Base64.static JmsResponsebase64BytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held as Base64.intcompareTo(JmsResponse other) Deprecated.ThecompareToplugins compiled when this class wasComparable<JmsResponse>.static JmsResponseprintableCharactersBytesResponse(Destination destination, byte[] bytes) Deprecated.A response that uses no transformer and whose body is these bytes, held in the printable-characters encoding, from thecom.trafficparrot.sdk.jmsdestination type.static JmsResponseprintableCharactersBytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held in the printable-characters encoding, from thecom.trafficparrot.sdk.jmsdestination type.static JmsResponseprintableCharactersBytesResponse(Destination destination, byte[] bytes) Deprecated.A response that uses no transformer and whose body is these bytes, held in the printable-characters encoding.static JmsResponseprintableCharactersBytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held in the printable-characters encoding.static JmsResponsewithJakartaResponseMessage(Destination destination, jakarta.jms.Message jakartaMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) Deprecated.A response that sends ajakarta.jmsmessage the transformer has built itself.withResolvedText(String resolvedText) Deprecated.Returns a copy withresolvedTextset (the content read fromJmsResponse.bodyFileNameat load time).Methods inherited from class com.trafficparrot.sdk.messaging.JmsResponse
compareTo, effectiveText, hasTransformer, toString, validate
-
Field Details
-
properties
Deprecated.Hides the inheritedpropertieswith its old element type. The descriptor is the same erasedjava.util.List, so no compiled plugin needs this; source does: without it,List<jms.JmsProperty> p = response.propertiesstops compiling. Same list object as the parent's.
-
-
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) Deprecated.Creates a response with every field a mapping file can set, as the constructor ofJmsResponsewith these parameters does.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERjmsResponseTransformerParameters- the mapping's parameters for its transformer; may be nulltext- the body; null whenbodyFileNameis setbodyFileName- a file under__filesto read the body from; null whentextis setbodyType- how the text is turned into the message body; null forTEXTjmsMessageType- the class name kept asJmsResponse.jmsMessageType; null for the one that suits the body typeproperties- the JMS properties to set on the message; null for nonefixedDelayInMilliseconds- the delay before sending, in milliseconds; null for nonedestinationLookup- where the response is sent; empty for the defaultresponseMessage- ajavax.jmsmessage to send as it is; empty to build one
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties, a delay and a JMS message type.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the bodybodyType- how the text is turned into the message body; null forTEXTjmsMessageType- the class name kept asJmsResponse.jmsMessageType; null for the one that suits the body typeproperties- the JMS properties to set on the message; null for nonefixedDelayInMilliseconds- the delay before sending, in milliseconds; null for none
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, List<JmsProperty> properties, long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties and a delay.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the bodybodyType- how the text is turned into the message body; null forTEXTproperties- the JMS properties to set on the message; null for nonefixedDelayInMilliseconds- the delay before sending, in milliseconds; 0 for none
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType) Deprecated.Creates a response with an inline body of a given type, no JMS properties and no delay.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the bodybodyType- how the text is turned into the message body; null forTEXT
-
JmsResponse
Deprecated.Creates a text response with no JMS properties and no delay.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the body
-
JmsResponse
Deprecated.Creates a text response that uses no transformer.- Parameters:
destination- the queue or topic to send the response totext- the body
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, Object object) throws com.fasterxml.jackson.core.JsonProcessingException Deprecated.Creates a response whose body is a Java object.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERobject- the object to send- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the object cannot be written as JSON
-
JmsResponse
public JmsResponse(Destination destination, Object object) throws com.fasterxml.jackson.core.JsonProcessingException Deprecated.Creates a response that uses no transformer and whose body is a Java object.- Parameters:
destination- the queue or topic to send the response toobject- the object to send- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the object cannot be written as JSON
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, com.github.tomakehurst.wiremock.extension.Parameters jmsResponseTransformerParameters, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds, Optional<?> destinationLookup, Optional<javax.jms.Message> responseMessage) Deprecated.Creates a response with an inline body and every other field, from thecom.trafficparrot.sdk.jmstypes.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERjmsResponseTransformerParameters- the mapping's parameters for its transformer; may be nulltext- the bodybodyType- how the text is turned into the message body; null forTEXTjmsMessageType- the class name kept asJmsResponse.jmsMessageType; null for the one that suits the body typeproperties- the JMS properties to set on the message; null for nonefixedDelayInMilliseconds- the delay before sending, in milliseconds; null for nonedestinationLookup- where the response is sent, as a destination lookup of either package; empty for the defaultresponseMessage- ajavax.jmsmessage to send as it is; empty to build one
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, String jmsMessageType, List<JmsProperty> properties, Long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties, a delay and a JMS message type, from thecom.trafficparrot.sdk.jmstypes.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the bodybodyType- how the text is turned into the message body; null forTEXTjmsMessageType- the class name kept asJmsResponse.jmsMessageType; null for the one that suits the body typeproperties- the JMS properties to set on the message; null for nonefixedDelayInMilliseconds- the delay before sending, in milliseconds; null for none
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType, List<JmsProperty> properties, long fixedDelayInMilliseconds) Deprecated.Creates a response with an inline body, JMS properties and a delay, from thecom.trafficparrot.sdk.jmstypes.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the bodybodyType- how the text is turned into the message body; null forTEXTproperties- the JMS properties to set on the message; null for nonefixedDelayInMilliseconds- the delay before sending, in milliseconds; 0 for none
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, String text, MessageBodyType bodyType) Deprecated.Creates a response with an inline body of a given type, from thecom.trafficparrot.sdk.jmstypes.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the bodybodyType- how the text is turned into the message body; null forTEXT
-
JmsResponse
Deprecated.Creates a text response, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERtext- the body
-
JmsResponse
Deprecated.Creates a text response that uses no transformer, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response totext- the body
-
JmsResponse
public JmsResponse(Destination destination, String jmsResponseTransformerClassName, Object object) throws com.fasterxml.jackson.core.JsonProcessingException Deprecated.Creates a response whose body is a Java object, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERobject- the object to send- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the object cannot be written as JSON
-
JmsResponse
public JmsResponse(Destination destination, Object object) throws com.fasterxml.jackson.core.JsonProcessingException Deprecated.Creates a response that uses no transformer and whose body is a Java object, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response toobject- the object to send- Throws:
com.fasterxml.jackson.core.JsonProcessingException- if the object cannot be written as JSON
-
-
Method Details
-
base64BytesResponse
Deprecated.A response that uses no transformer and whose body is these bytes, held as Base64.- Parameters:
destination- the queue or topic to send the response tobytes- the body- Returns:
- the response
-
base64BytesResponse
public static JmsResponse base64BytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held as Base64.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERbytes- the body- Returns:
- the response
-
printableCharactersBytesResponse
Deprecated.A response that uses no transformer and whose body is these bytes, held in the printable-characters encoding.- Parameters:
destination- the queue or topic to send the response tobytes- the body- Returns:
- the response
-
printableCharactersBytesResponse
public static JmsResponse printableCharactersBytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held in the printable-characters encoding.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERbytes- the body- Returns:
- the response
-
base64BytesResponse
Deprecated.A response that uses no transformer and whose body is these bytes, held as Base64, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response tobytes- the body- Returns:
- the response
-
base64BytesResponse
public static JmsResponse base64BytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held as Base64, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERbytes- the body- Returns:
- the response
-
printableCharactersBytesResponse
Deprecated.A response that uses no transformer and whose body is these bytes, held in the printable-characters encoding, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response tobytes- the body- Returns:
- the response
-
printableCharactersBytesResponse
public static JmsResponse printableCharactersBytesResponse(Destination destination, String jmsResponseTransformerClassName, byte[] bytes) Deprecated.A response whose body is these bytes, held in the printable-characters encoding, from thecom.trafficparrot.sdk.jmsdestination type.- Parameters:
destination- the queue or topic to send the response tojmsResponseTransformerClassName- the transformer's class name, orNO_TRANSFORMERbytes- the body- Returns:
- the response
-
withJakartaResponseMessage
public static JmsResponse withJakartaResponseMessage(Destination destination, jakarta.jms.Message jakartaMessage, long fixedDelayMilliseconds, Optional<DestinationLookup> destinationLookup) Deprecated.A response that sends ajakarta.jmsmessage the transformer has built itself.- Parameters:
destination- the queue or topic to send the response tojakartaMessage- the message to sendfixedDelayMilliseconds- the delay before sending, in milliseconds; 0 for nonedestinationLookup- where the response is sent; empty for the default- Returns:
- the response, which uses no transformer
-
withResolvedText
Deprecated.Description copied from class:JmsResponseReturns a copy withresolvedTextset (the content read fromJmsResponse.bodyFileNameat load time). Every persisted field is preserved so a subsequent save re-writesbodyFileNamewith nulltext, keeping the sidecar reference intact.- Overrides:
withResolvedTextin classJmsResponse- Parameters:
resolvedText- the content of theJmsResponse.bodyFileNamefile- Returns:
- the copy
-
compareTo
Deprecated.ThecompareToplugins compiled when this class wasComparable<JmsResponse>.- Parameters:
other- the response to compare this one with- Returns:
- a negative number, zero or a positive number as this response's destination, then its text, sorts before, with or after the other's
-
JmsResponseinstead. This class extends the new location and keeps the members plugins compiled against earlier SDKs link to: those taking thecom.trafficparrot.sdk.messagingtypes, and the older ones taking thecom.trafficparrot.sdk.jmstypes.