Class ManagementProtocolHeader

    • Constructor Detail

      • ManagementProtocolHeader

        protected ManagementProtocolHeader​(int version)
        Construct an instance with the protocol version for the header.
        Parameters:
        version - The protocol version
    • Method Detail

      • write

        public void write​(DataOutput output)
                   throws IOException
        Write the header information to the provided DataOutput.
        Parameters:
        output - The output to write to
        Throws:
        IOException - If any problems occur writing to the output
      • getVersion

        public int getVersion()
        The protocol version for the current communication.
        Returns:
        The protocol version
      • getType

        public abstract byte getType()
        The type
        Returns:
        the protocol byte identifying the type
      • validateSignature

        protected static void validateSignature​(DataInput input)
                                         throws IOException
        Validate the header signature.
        Parameters:
        input - The input to read the signature from
        Throws:
        IOException - If any read problems occur