Class HttpTunnelServer.HttpConnection
java.lang.Object
org.springframework.boot.devtools.tunnel.server.HttpTunnelServer.HttpConnection
- Enclosing class:
 - HttpTunnelServer
 
Encapsulates an HTTP request/response pair.
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprotected voidcomplete()Called when a request is complete.final ServerHttpRequestReturn the underlying request.protected final ServerHttpResponseReturn the underlying response.booleanDetect if the request is actually a signal to disconnect.booleanisOlderThan(int time) Determine if a connection is older than the specified time.voidrespond(HttpTunnelPayload payload) Send a payload response.voidrespond(HttpStatus status) Send an HTTP status response.protected ServerHttpAsyncRequestControlStart asynchronous support or if unavailable returnnullto causewaitForResponse()to block.voidCause the request to block or use asynchronous methods to wait until a response is available. 
- 
Constructor Details
- 
HttpConnection
 
 - 
 - 
Method Details
- 
startAsync
Start asynchronous support or if unavailable returnnullto causewaitForResponse()to block.- Returns:
 - the async request control
 
 - 
getRequest
Return the underlying request.- Returns:
 - the request
 
 - 
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:
 trueif 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
Send an HTTP status response.- Parameters:
 status- the status to send- Throws:
 IOException- in case of I/O errors
 - 
respond
Send a payload response.- Parameters:
 payload- the payload to send- Throws:
 IOException- in case of I/O errors
 - 
complete
protected void complete()Called when a request is complete. 
 -