Package com.ibm.wsspi.http
Interface HttpInboundConnection
- All Known Subinterfaces:
Http2InboundConnection
public interface HttpInboundConnection
Representation of an inbound HTTP connection that the dispatcher will provide
to containers.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
When a container is finished with the connection, this API signals that and allows the dispatcher to complete any remaining work for the connection.Access the HTTP date format utility class.Access the string encoding utility class.Access the local/server side address of the connection.getLocalHostName
(boolean canonical) Access the local/server side address of the connection.int
Access the local/server side port of the connection.Access the remote/client side address of the connection.getRemoteHostName
(boolean canonical) Access the remote/client side address of the connection.int
Access the remote/client side port of the connection.Access the request message object for this connection.Get the requested host based on the Host and/or private headers.int
Get the requested port based on the Host and/or private headers.Access the response message object for this connection.Access any SSL information, if this connection was secure.getTrustedHeader
(String headerKey) Return the value of the specified trusted header if trusted headers are enabled for this connection.boolean
This will indicate whether or not private headers should be trusted on this connection.
-
Method Details
-
getLocalHostName
Access the local/server side address of the connection.- Parameters:
canonical
- if true, attempts to find fully qualified domain name- Returns:
- String host name
- See Also:
-
getLocalHostAddress
String getLocalHostAddress()Access the local/server side address of the connection.- Returns:
- String IP Address
-
getLocalPort
int getLocalPort()Access the local/server side port of the connection.- Returns:
- int
-
getLocalHostAlias
String getLocalHostAlias()- Returns:
- The concatenated canonicalHostName:port string representing this inbound connection (for use when looking up associated resources)
-
getRemoteHostName
Access the remote/client side address of the connection.- Parameters:
canonical
- if true, attempts to find fully qualified domain name- Returns:
- String host name
- See Also:
-
getRemoteHostAddress
String getRemoteHostAddress()Access the remote/client side address of the connection.- Returns:
- String IP Address
-
getRemotePort
int getRemotePort()Access the remote/client side port of the connection.- Returns:
- int
-
getRequest
HttpRequest getRequest()Access the request message object for this connection.- Returns:
- HttpRequest
-
getResponse
HttpResponse getResponse()Access the response message object for this connection.- Returns:
- HttpResponse
-
getSSLContext
SSLContext getSSLContext()Access any SSL information, if this connection was secure. This will return null if it was not a secure connection.- Returns:
- SSLContext
-
getEncodingUtils
EncodingUtils getEncodingUtils()Access the string encoding utility class. This is never null.- Returns:
- EncodingUtils
-
getDateFormatter
HttpDateFormat getDateFormatter()Access the HTTP date format utility class. This includes support for all the various HTTP date styles, and is never null.- Returns:
- HttpDateFormat
-
finish
When a container is finished with the connection, this API signals that and allows the dispatcher to complete any remaining work for the connection. The exception passed is used in the decision whether to perform a read for another request or to simply close the connection. Errors while reading or writing during this request/response exchange would be passed along here.- Parameters:
e
-
-
useTrustedHeaders
boolean useTrustedHeaders()This will indicate whether or not private headers should be trusted on this connection.- Returns:
- true if trusted/private headers should be used, false if not.
-
getTrustedHeader
Return the value of the specified trusted header if trusted headers are enabled for this connection.- Parameters:
headerKey
- Trusted header to find- Returns:
- value of trusted header or null.
-
getRequestedHost
String getRequestedHost()Get the requested host based on the Host and/or private headers.per Servlet spec, this is similar to getServerName: Returns the host name of the server to which the request was sent. It is the value of the part before ":" in the Host header value, if any, or the resolved server name, or the server IP address.
-
getRequestedPort
int getRequestedPort()Get the requested port based on the Host and/or private headers. per Servlet spec, this is similar to getServerPort: Returns the port number to which the request was sent. It is the value of the part after ":" in the Host header value, if any, or the server port where the client connection was accepted on.
-