protected static class HttpTunnelServer.HttpConnection extends Object
| Constructor and Description |
|---|
HttpConnection(org.springframework.http.server.ServerHttpRequest request,
org.springframework.http.server.ServerHttpResponse response) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
complete()
Called when a request is complete.
|
org.springframework.http.server.ServerHttpRequest |
getRequest()
Return the underlying request.
|
protected org.springframework.http.server.ServerHttpResponse |
getResponse()
Return the underlying response.
|
boolean |
isDisconnectRequest()
Detect if the request is actually a signal to disconnect.
|
boolean |
isOlderThan(int time)
Determine if a connection is older than the specified time.
|
void |
respond(org.springframework.http.HttpStatus status)
Send a HTTP status response.
|
void |
respond(HttpTunnelPayload payload)
Send a payload response.
|
protected org.springframework.http.server.ServerHttpAsyncRequestControl |
startAsync()
Start asynchronous support or if unavailable return
null to cause
waitForResponse() to block. |
void |
waitForResponse()
Cause the request to block or use asynchronous methods to wait until a response
is available.
|
public HttpConnection(org.springframework.http.server.ServerHttpRequest request,
org.springframework.http.server.ServerHttpResponse response)
protected org.springframework.http.server.ServerHttpAsyncRequestControl startAsync()
null to cause
waitForResponse() to block.public final org.springframework.http.server.ServerHttpRequest getRequest()
protected final org.springframework.http.server.ServerHttpResponse getResponse()
public boolean isOlderThan(int time)
time - the time to checktrue if the request is older than the timepublic void waitForResponse()
public boolean isDisconnectRequest()
public void respond(org.springframework.http.HttpStatus status)
throws IOException
status - the status to sendIOException - in case of I/O errorspublic void respond(HttpTunnelPayload payload) throws IOException
payload - the payload to sendIOException - in case of I/O errorsprotected void complete()
Copyright © 2019 Pivotal Software, Inc.. All rights reserved.