public final class ConnectionInfo extends Object
Depending on the chosen factory method, the information
can be retrieved directly from the channel or additionally
using the "Forwarded", or "X-Forwarded-*"
HTTP request headers.
| Modifier and Type | Method and Description |
|---|---|
InetSocketAddress |
getHostAddress()
Return the host address of the connection.
|
InetSocketAddress |
getRemoteAddress()
Return the remote address of the connection.
|
String |
getScheme()
Return the connection scheme.
|
ConnectionInfo |
withHostAddress(InetSocketAddress hostAddress)
Return a new
ConnectionInfo with the updated host address. |
ConnectionInfo |
withRemoteAddress(InetSocketAddress remoteAddress)
Return a new
ConnectionInfo with the updated remote address. |
ConnectionInfo |
withScheme(String scheme)
Return a new
ConnectionInfo with the updated scheme. |
public InetSocketAddress getHostAddress()
public InetSocketAddress getRemoteAddress()
public String getScheme()
public ConnectionInfo withHostAddress(InetSocketAddress hostAddress)
ConnectionInfo with the updated host address.hostAddress - the host addressConnectionInfopublic ConnectionInfo withRemoteAddress(InetSocketAddress remoteAddress)
ConnectionInfo with the updated remote address.remoteAddress - the remote addressConnectionInfopublic ConnectionInfo withScheme(String scheme)
ConnectionInfo with the updated scheme.scheme - the connection schemeConnectionInfo