public class HttpTunnelConnection extends java.lang.Object implements TunnelConnection
TunnelConnection implementation that uses HTTP to transfer data.TunnelClient,
HttpTunnelServer| Modifier and Type | Class and Description |
|---|---|
protected class |
HttpTunnelConnection.TunnelChannel
A
WritableByteChannel used to transfer traffic. |
| Modifier | Constructor and Description |
|---|---|
|
HttpTunnelConnection(java.lang.String url,
org.springframework.http.client.ClientHttpRequestFactory requestFactory)
Create a new
HttpTunnelConnection instance. |
protected |
HttpTunnelConnection(java.lang.String url,
org.springframework.http.client.ClientHttpRequestFactory requestFactory,
java.util.concurrent.Executor executor)
Create a new
HttpTunnelConnection instance. |
| Modifier and Type | Method and Description |
|---|---|
protected org.springframework.http.client.ClientHttpRequest |
createRequest(boolean hasPayload) |
HttpTunnelConnection.TunnelChannel |
open(java.nio.channels.WritableByteChannel incomingChannel,
java.io.Closeable closeable)
Open the tunnel connection.
|
public HttpTunnelConnection(java.lang.String url,
org.springframework.http.client.ClientHttpRequestFactory requestFactory)
HttpTunnelConnection instance.url - the URL to connect torequestFactory - the HTTP request factoryprotected HttpTunnelConnection(java.lang.String url,
org.springframework.http.client.ClientHttpRequestFactory requestFactory,
java.util.concurrent.Executor executor)
HttpTunnelConnection instance.url - the URL to connect torequestFactory - the HTTP request factoryexecutor - the executor used to handle connectionspublic HttpTunnelConnection.TunnelChannel open(java.nio.channels.WritableByteChannel incomingChannel, java.io.Closeable closeable) throws java.lang.Exception
TunnelConnectionopen in interface TunnelConnectionincomingChannel - a WritableByteChannel that should be used to write
any incoming data received from the remote servercloseable - a closeable to call when the channel is closedWritableByteChannel that should be used to send any outgoing data
destined for the remote serverjava.lang.Exception - in case of errorsprotected final org.springframework.http.client.ClientHttpRequest createRequest(boolean hasPayload)
throws java.io.IOException
java.io.IOException