Class SerializableAdaptrisMessage

  • All Implemented Interfaces:
    SerializableMessage, java.io.Serializable

    public class SerializableAdaptrisMessage
    extends java.lang.Object
    implements SerializableMessage
    The SerializableAdaptrisMessage simply represents an AdaptrisMessage that can be serialized.

    Many of the AdaptrisMessage's class members have been removed to facilitate serialization, such as object metadata - considering any object may be placed in object metadata, we could never be sure the message would serialize. The semantics of each method will attempt to follow that defined by AdaptrisMessage even though it does not implement that interface.

    See Also:
    Serialized Form

    In the adapter configuration file this class is aliased as serializable-adaptris-message which is the preferred alternative to the fully qualified classname when building your configuration.

    • Constructor Detail

      • SerializableAdaptrisMessage

        public SerializableAdaptrisMessage()
      • SerializableAdaptrisMessage

        public SerializableAdaptrisMessage​(SerializableMessage orig)
      • SerializableAdaptrisMessage

        public SerializableAdaptrisMessage​(java.lang.String uniqueId)
      • SerializableAdaptrisMessage

        public SerializableAdaptrisMessage​(java.lang.String uniqueId,
                                           java.lang.String payload)
    • Method Detail

      • setPayload

        public void setPayload​(java.lang.String payload,
                               java.lang.String payloadEncoding)
      • setMetadata

        public void setMetadata​(KeyValuePairSet metadata)
        Set the metadata for this message.

        This overwrites all metadata in the message with the corresponding set; passing in null or an empty KeyValuePairSet will remove all metadata.

        Parameters:
        metadata - the metadata to set.
      • addMetadata

        public void addMetadata​(java.lang.String key,
                                java.lang.String value)
        Add a single item of metadata.
        Parameters:
        key - the key
        value - the value
        See Also:
        AdaptrisMessage.addMetadata(String, String)
      • addMetadata

        public void addMetadata​(MetadataElement e)
        Add a single item of metadata.
        Parameters:
        e - the metadata to add.
      • containsKey

        public boolean containsKey​(java.lang.String key)
      • getMetadataValue

        public java.lang.String getMetadataValue​(java.lang.String key)
      • setMessageHeaders

        public void setMessageHeaders​(java.util.Map<java.lang.String,​java.lang.String> arg0)
        Specified by:
        setMessageHeaders in interface SerializableMessage
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object