org.springframework.boot.devtools.tunnel.server

Class HttpTunnelServer.HttpConnection

  • java.lang.Object
    • org.springframework.boot.devtools.tunnel.server.HttpTunnelServer.HttpConnection
  • Enclosing class:
    HttpTunnelServer


    protected static class HttpTunnelServer.HttpConnection
    extends Object
    Encapsulates a HTTP request/response pair.
    • Method Detail

      • getRequest

        public final ServerHttpRequest getRequest()
        Return the underlying request.
        Returns:
        the request
      • getResponse

        protected final ServerHttpResponse getResponse()
        Return the underlying response.
        Returns:
        the response
      • isOlderThan

        public boolean isOlderThan(int time)
        Determine if a connection is older than the specified time.
        Parameters:
        time - the time to check
        Returns:
        true if the request is older than the time
      • waitForResponse

        public void waitForResponse()
        Cause the request to block or use asynchronous methods to wait until a response is available.
      • isDisconnectRequest

        public boolean isDisconnectRequest()
        Detect if the request is actually a signal to disconnect.
        Returns:
        if the request is a signal to disconnect
      • respond

        public void respond(HttpStatus status)
                     throws IOException
        Send a HTTP status response.
        Parameters:
        status - the status to send
        Throws:
        IOException - in case of I/O errors
      • complete

        protected void complete()
        Called when a request is complete.