Class DisconnectMessage

  • All Implemented Interfaces:
    Serializable

    public class DisconnectMessage
    extends AbstractMessage
    This message is sent back and forth between two endpoints when one of them wants to close the connection. Its purpose is to prevent any actual message bytes from getting lost in the close process, which can happen if a socket is closed while there are still bytes to be written in the buffer (a common Java socket problem).
    Author:
    Rene Schneider - initial API and implementation
    See Also:
    Serialized Form
    • Constructor Detail

      • DisconnectMessage

        public DisconnectMessage​(boolean anIsConfirmation)
        Creates a new instance.
        Parameters:
        anIsConfirmation - whether this is a confirmation message
      • DisconnectMessage

        public DisconnectMessage()
        The no-arg constructor, primarily used for serialization.
    • Method Detail

      • isConfirmation

        public boolean isConfirmation()