org.springframework.boot.devtools.tunnel.payload

Class HttpTunnelPayload

  • java.lang.Object
    • org.springframework.boot.devtools.tunnel.payload.HttpTunnelPayload


  • public class HttpTunnelPayload
    extends Object
    Encapsulates a payload data sent via a HTTP tunnel.
    Since:
    1.3.0
    Author:
    Phillip Webb
    • Field Detail

      • HEX_CHARS

        protected static final char[] HEX_CHARS
    • Constructor Detail

      • HttpTunnelPayload

        public HttpTunnelPayload(long sequence,
                                 ByteBuffer data)
        Create a new HttpTunnelPayload instance.
        Parameters:
        sequence - the sequence number of the payload
        data - the payload data
    • Method Detail

      • getSequence

        public long getSequence()
        Return the sequence number of the payload.
        Returns:
        the sequence
      • writeTo

        public void writeTo(WritableByteChannel channel)
                     throws IOException
        Write the content of this payload to the given target channel.
        Parameters:
        channel - the channel to write to
        Throws:
        IOException - in case of I/O errors
      • logIncoming

        public void logIncoming()
        Log incoming payload information at trace level to aid diagnostics.
      • logOutgoing

        public void logOutgoing()
        Log incoming payload information at trace level to aid diagnostics.
      • toHexString

        public String toHexString()
        Return the payload as a hexadecimal string.
        Returns:
        the payload as a hex string