Class EReplyMessage

  • All Implemented Interfaces:
    java.io.Serializable
    Direct Known Subclasses:
    ApplicationInfoReply, HistoricReply, MonitoredObjectReply, TimerReply

    public class EReplyMessage
    extends EMessage
    implements java.io.Serializable
    Required base class for all application request messages. Adds the message fields reply status, reply reason, and final reply flag.

    This message is not abstract because it is a complete message in its own right and may be used to send a generic reply to any request.

    Note: messages are limited to 31 fields. This is due to eBus binary serialization format. This number is decreased to 27 fields for sub-classes because EMessage has two fields: subject and timestamp and EReplyMessage has two fields: replyStatus and replyReason.

    Author:
    Charles Rapp
    See Also:
    ENotificationMessage, ERequestMessage, Serialized Form
    • Constructor Detail

      • EReplyMessage

        protected EReplyMessage​(EReplyMessage.Builder<?,​?> builder)
        Creates a new eBus reply message based on the given reply message builder. builder is guaranteed to contain a valid message configuration at this point.
        Parameters:
        builder - contains the reply message configuration.
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object o)
        Returns true if o is a non-null EReplyMessage instance with a reply status and reply reason equal to this EReplyMessage instance and false otherwise.
        Overrides:
        equals in class EMessage
        Parameters:
        o - comparison object.
        Returns:
        true if the message fields are equal and false otherwise.
      • hashCode

        public int hashCode()
        Returns the reply message hash code.
        Overrides:
        hashCode in class EMessage
        Returns:
        the reply message hash code.
      • toString

        public java.lang.String toString()
        Returns the message subject, timestamp, and sequence number as a string.
        Overrides:
        toString in class EMessage
        Returns:
        the message as text.
      • isFinal

        public boolean isFinal()
        Returns true if this is the final reply and false if another reply is to be expected.
        Returns:
        true if this is the final reply.