Class ErrorMsg


  • public class ErrorMsg
    extends RoutableMsg
    This message is part of the replication protocol. This message is sent by a server or a replication server when an error is detected in the context of a total update.
    • Constructor Detail

      • ErrorMsg

        public ErrorMsg​(int sender,
                        int destination,
                        org.forgerock.i18n.LocalizableMessage details)
        Creates an ErrorMsg providing the destination server.
        Parameters:
        sender - The server ID of the server that send this message.
        destination - The destination server or servers of this message.
        details - The message containing the details of the error.
      • ErrorMsg

        public ErrorMsg​(int destination,
                        org.forgerock.i18n.LocalizableMessage details)
        Creates an ErrorMsg.
        Parameters:
        destination - replication server id
        details - details of the error
    • Method Detail

      • getDetails

        public org.forgerock.i18n.LocalizableMessage getDetails()
        Get the details from this message.
        Returns:
        the details from this message.
      • getMsgID

        public String getMsgID()
        Get the msgID from this message.
        Returns:
        the msgID from this message.
      • getBytes

        public byte[] getBytes​(short version)
        Serializes the PDU using the provided replication protocol version. WARNING: should be overwritten by a PDU (sub class) we want to support older protocol version serialization for.
        Specified by:
        getBytes in class ReplicationMsg
        Parameters:
        version - The protocol version to use for serialization. The version should normally be older than the current one.
        Returns:
        The encoded PDU, or null if the message isn't supported in that protocol version.
      • toString

        public String toString()
        Returns a string representation of the message.
        Overrides:
        toString in class RoutableMsg
        Returns:
        the string representation of this message.
      • getCreationTime

        public long getCreationTime()
        Get the creation time of this message. When several attempts of initialization are done sequentially, it helps sorting the good ones, from the ones that relate to ended initialization when they are received.
        Returns:
        the creation time of this message.
      • setCreationTime

        public void setCreationTime​(long creationTime)
        Get the creation time of this message.
        Parameters:
        creationTime - the creation time of this message.