Class MessageBodyType

java.lang.Object
com.trafficparrot.sdk.messaging.MessageBodyType
com.trafficparrot.sdk.jms.MessageBodyType

@Deprecated public class MessageBodyType extends MessageBodyType
Deprecated.
Use MessageBodyType instead. This class extends the new location for backward compatibility - existing SDK plugins continue to work unchanged. Serialization is handled by the parent's @JsonValue annotation. The @JsonCreator here ensures Jackson creates a jms.MessageBodyType (not the parent) when deserializing to this class.
  • Field Details

    • TEXT

      public static MessageBodyType TEXT
      Deprecated.
      A text body: the response's text is the body.
    • BYTES

      public static MessageBodyType BYTES
      Deprecated.
      A binary body held as Base64: the response's text is the Base64 of the bytes to send.
    • PRINTABLE_CHARACTERS

      public static MessageBodyType PRINTABLE_CHARACTERS
      Deprecated.
      A binary body held in the printable-characters encoding: the response's text is that encoding of the bytes to send.
    • UNKNOWN_BODY_TYPE

      public static MessageBodyType UNKNOWN_BODY_TYPE
      Deprecated.
      Stands in where a body type is not known or does not apply. Not a type to give a response.
  • Constructor Details

    • MessageBodyType

      public MessageBodyType(String value)
      Deprecated.
      Creates a body type from its text in a mapping file.
      Parameters:
      value - the body type as a mapping file writes it
  • Method Details

    • protoMessageType

      public static MessageBodyType protoMessageType(String typeName)
      Deprecated.
      The type of a body that is a protobuf message.
      Parameters:
      typeName - the protobuf message type's name
      Returns:
      the body type proto/<typeName>
    • anyJavaProtoMessageType

      public static MessageBodyType anyJavaProtoMessageType()
      Deprecated.
      The body type javaProto/*, which stands for a protobuf message of any type with a Java class.
      Returns:
      the body type
    • anyJavaClassType

      public static MessageBodyType anyJavaClassType()
      Deprecated.
      The body type java.lang.Object, which stands for a Java object of any class.
      Returns:
      the body type
    • javaProtoMessageType

      public static MessageBodyType javaProtoMessageType(String javaAndProtoTypeName)
      Deprecated.
      The type of a body that is a protobuf message with a Java class, when the class and the message type have one name.
      Parameters:
      javaAndProtoTypeName - the name the Java class and the protobuf message type share
      Returns:
      the body type javaProto/<javaAndProtoTypeName>
    • javaProtoMessageType

      public static MessageBodyType javaProtoMessageType(String javaTypeName, String protoTypeName)
      Deprecated.
      The type of a body that is a protobuf message with a Java class.
      Parameters:
      javaTypeName - the Java class's name
      protoTypeName - the protobuf message type's name
      Returns:
      the body type javaProto/<javaTypeName>:<protoTypeName>, or javaProto/<javaTypeName> when the two names are the same
    • javaClassType

      public static MessageBodyType javaClassType(Object object)
      Deprecated.
      The type of a body that is this Java object.
      Parameters:
      object - the object
      Returns:
      a body type that names the object's class, or for a dynamic proxy its invocation handler's class
    • canRepresent

      public boolean canRepresent(MessageBodyType bodyType)
      Deprecated.
      The canRepresent for plugins compiled against the com.trafficparrot.sdk.jms types.
      Parameters:
      bodyType - the other body type
      Returns:
      true if the two are equal, or each is one of TEXT, BYTES and PRINTABLE_CHARACTERS