public final class ConnectionInfo
extends java.lang.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 |
---|---|
java.net.InetSocketAddress |
getHostAddress()
Return the host address of the connection.
|
java.net.InetSocketAddress |
getRemoteAddress()
Return the remote address of the connection.
|
java.lang.String |
getScheme()
Return the connection scheme.
|
ConnectionInfo |
withHostAddress(java.net.InetSocketAddress hostAddress)
Return a new
ConnectionInfo with the updated host address. |
ConnectionInfo |
withRemoteAddress(java.net.InetSocketAddress remoteAddress)
Return a new
ConnectionInfo with the updated remote address. |
ConnectionInfo |
withScheme(java.lang.String scheme)
Return a new
ConnectionInfo with the updated scheme. |
public java.net.InetSocketAddress getHostAddress()
public java.net.InetSocketAddress getRemoteAddress()
public java.lang.String getScheme()
public ConnectionInfo withHostAddress(java.net.InetSocketAddress hostAddress)
ConnectionInfo
with the updated host address.hostAddress
- the host addressConnectionInfo
public ConnectionInfo withRemoteAddress(java.net.InetSocketAddress remoteAddress)
ConnectionInfo
with the updated remote address.remoteAddress
- the remote addressConnectionInfo
public ConnectionInfo withScheme(java.lang.String scheme)
ConnectionInfo
with the updated scheme.scheme
- the connection schemeConnectionInfo