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 | Field and Description |
|---|---|
| pack-priv static final String | |
| pack-priv static final int | |
| pack-priv static final int | |
| pack-priv final SocketAddress | |
| pack-priv final String | |
| pack-priv final int | |
| pack-priv final boolean | |
| pack-priv final SocketAddress | |
| pack-priv final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| pack-priv | ConnectionInfo(SocketAddress hostAddress, String hostName, int hostPort, SocketAddress remoteAddress, String scheme, boolean isInetAddress)
|
| Modifier and Type | Method and Description |
|---|---|
| pack-priv static ConnectionInfo | from(Channel channel, HttpRequest request, boolean secured, SocketAddress remoteAddress, BiFunction<ConnectionInfo, HttpRequest, ConnectionInfo> forwardedHeaderHandler)
|
| public static int | Returns: the default host port number based on schemea connection scheme like "http", "https", or "wss" scheme)Returns the default host port number based on scheme. |
| public InetSocketAddress | |
| public String | |
| public int | |
| public InetSocketAddress | |
| public String | |
| public ConnectionInfo | Returns: a newConnectionInfothe host address hostAddress)Return a new |
| public ConnectionInfo | Returns: a newConnectionInfothe updated host address hostAddress, String the updated host name hostName, int the updated host port hostPort)Return a new |
| public ConnectionInfo | Returns: a newConnectionInfothe remote address remoteAddress)Return a new |
| public ConnectionInfo | Returns: a newConnectionInfothe connection scheme scheme)Return a new |
| DEFAULT_HOST_NAME | back to summary |
|---|---|
| pack-priv static final String DEFAULT_HOST_NAME | |
| DEFAULT_HTTP_PORT | back to summary |
|---|---|
| pack-priv static final int DEFAULT_HTTP_PORT | |
| DEFAULT_HTTPS_PORT | back to summary |
|---|---|
| pack-priv static final int DEFAULT_HTTPS_PORT | |
| hostAddress | back to summary |
|---|---|
| pack-priv final SocketAddress hostAddress | |
| hostName | back to summary |
|---|---|
| pack-priv final String hostName | |
| hostPort | back to summary |
|---|---|
| pack-priv final int hostPort | |
| isInetAddress | back to summary |
|---|---|
| pack-priv final boolean isInetAddress | |
| remoteAddress | back to summary |
|---|---|
| pack-priv final SocketAddress remoteAddress | |
| scheme | back to summary |
|---|---|
| pack-priv final String scheme | |
| ConnectionInfo | back to summary |
|---|---|
| pack-priv ConnectionInfo(SocketAddress hostAddress, SocketAddress remoteAddress, boolean secured) | |
| ConnectionInfo | back to summary |
|---|---|
| pack-priv ConnectionInfo(SocketAddress hostAddress, String hostName, int hostPort, SocketAddress remoteAddress, String scheme, boolean isInetAddress) | |
| from | back to summary |
|---|---|
| pack-priv static ConnectionInfo from(Channel channel, HttpRequest request, boolean secured, SocketAddress remoteAddress, BiFunction<ConnectionInfo, HttpRequest, ConnectionInfo> forwardedHeaderHandler) | |
| getDefaultHostPort | back to summary |
|---|---|
| public static int getDefaultHostPort(String scheme) Returns the default host port number based on scheme.
| |
| getHostAddress | back to summary |
|---|---|
| public InetSocketAddress getHostAddress() Return the host address of the connection.
| |
| getHostName | back to summary |
|---|---|
| public String getHostName() Returns the connection host name.
| |
| getHostPort | back to summary |
|---|---|
| public int getHostPort() Returns the connection host port.
| |
| getRemoteAddress | back to summary |
|---|---|
| public InetSocketAddress getRemoteAddress() Return the remote address of the connection.
| |
| getScheme | back to summary |
|---|---|
| public String getScheme() Return the connection scheme.
| |
| withHostAddress | back to summary |
|---|---|
| public ConnectionInfo withHostAddress(InetSocketAddress hostAddress) Return a new
| |
| withHostAddress | back to summary |
|---|---|
| public ConnectionInfo withHostAddress(InetSocketAddress hostAddress, String hostName, int hostPort) Return a new
| |
| withRemoteAddress | back to summary |
|---|---|
| public ConnectionInfo withRemoteAddress(InetSocketAddress remoteAddress) Return a new
| |
| withScheme | back to summary |
|---|---|
| public ConnectionInfo withScheme(String scheme) Return a new
| |