public class ClientInformation
extends java.lang.Object
The information available about a client will depend on the server and client configuration, such as whether the client is identified with an existing HttpSession or Principal. It must be assumed that much of the information stored in this class will have a null value in many cases.
All information in this class is sourced from equivalent methods in
HttpServletRequest.
| Modifier and Type | Field and Description |
|---|---|
private javax.servlet.http.HttpServletRequest |
httpServletRequest |
private java.lang.String |
remoteAddress |
private java.lang.String |
remoteHost |
private int |
remotePort |
private java.lang.String |
remoteUser |
private javax.servlet.http.HttpSession |
session |
private java.lang.String |
userAgent |
private java.security.Principal |
userPrincipal |
| Constructor and Description |
|---|
ClientInformation(java.lang.String remoteAddress,
java.lang.String remoteHost,
java.lang.String remoteUser,
int remotePort,
javax.servlet.http.HttpSession session,
java.security.Principal userPrincipal,
java.lang.String userAgent,
javax.servlet.http.HttpServletRequest httpServletRequest) |
| Modifier and Type | Method and Description |
|---|---|
javax.servlet.http.HttpServletRequest |
getHttpServletRequest() |
java.lang.String |
getRemoteAddress() |
java.lang.String |
getRemoteHost() |
int |
getRemotePort() |
java.lang.String |
getRemoteUser() |
javax.servlet.http.HttpSession |
getSession() |
java.lang.String |
getUserAgent() |
java.security.Principal |
getUserPrincipal() |
private java.lang.String remoteAddress
private java.lang.String remoteHost
private java.lang.String remoteUser
private int remotePort
private javax.servlet.http.HttpSession session
private java.security.Principal userPrincipal
private java.lang.String userAgent
private javax.servlet.http.HttpServletRequest httpServletRequest
public ClientInformation(java.lang.String remoteAddress,
java.lang.String remoteHost,
java.lang.String remoteUser,
int remotePort,
javax.servlet.http.HttpSession session,
java.security.Principal userPrincipal,
java.lang.String userAgent,
javax.servlet.http.HttpServletRequest httpServletRequest)
public java.lang.String getRemoteAddress()
public java.lang.String getRemoteHost()
public int getRemotePort()
public java.lang.String getRemoteUser()
public javax.servlet.http.HttpSession getSession()
public java.security.Principal getUserPrincipal()
public java.lang.String getUserAgent()
public javax.servlet.http.HttpServletRequest getHttpServletRequest()