Class HeartbeatMessage


  • public class HeartbeatMessage
    extends java.lang.Object
    • Field Detail

      • type

        protected short type
      • payload

        protected byte[] payload
      • padding

        protected byte[] padding
    • Constructor Detail

      • HeartbeatMessage

        public HeartbeatMessage​(short type,
                                byte[] payload,
                                byte[] padding)
    • Method Detail

      • getPaddingLength

        public int getPaddingLength()
      • getPayload

        public byte[] getPayload()
      • getType

        public short getType()
      • encode

        public void encode​(java.io.OutputStream output)
                    throws java.io.IOException
        Encode this HeartbeatMessage to an OutputStream.
        Parameters:
        output - the OutputStream to encode to.
        Throws:
        java.io.IOException
      • parse

        public static HeartbeatMessage parse​(java.io.InputStream input)
                                      throws java.io.IOException
        Parse a HeartbeatMessage from an InputStream.
        Parameters:
        input - the InputStream to parse from.
        Returns:
        a HeartbeatMessage object.
        Throws:
        java.io.IOException