Package org.opends.server.protocols.http
Class HttpLogContext
- java.lang.Object
-
- org.forgerock.services.context.AbstractContext
-
- org.opends.server.protocols.http.HttpLogContext
-
- All Implemented Interfaces:
org.forgerock.services.context.Context,HTTPRequestInfo
public final class HttpLogContext extends org.forgerock.services.context.AbstractContext implements HTTPRequestInfo
This context contains the logging informations related to the request processing.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAuthUser()Returns the username that was used to authenticate.StringgetClientAddress()Returns the client's address.StringgetClientHost()Returns the client's host.intgetClientPort()Returns the client's port.longgetConnectionID()Returns the unique identifier that has been assigned to the client connection for this HTTP request.StringgetMethod()Returns the HTTP method/verb used for this request.StringgetProtocol()Returns the protocol used for this request.StringgetServerAddress()Returns the server's host.StringgetServerHost()Returns the server's host.intgetServerPort()Returns the server's port.intgetStatusCode()Returns the HTTP status code returned to the client.longgetTotalProcessingTime()Returns the total processing time for this HTTP request.StringgetTransactionId()Returns the transactionId for this request.URIgetUri()Returns the URI issued by the client.StringgetUserAgent()Returns the user agent used by the client.voidlog(int statusCode)Logs the current request info in the HTTP access log.voidsetAuthUser(String authUser)Sets the username that was used to authenticate.
-
-
-
Method Detail
-
log
public void log(int statusCode)
Description copied from interface:HTTPRequestInfoLogs the current request info in the HTTP access log.- Specified by:
login interfaceHTTPRequestInfo- Parameters:
statusCode- the HTTP status code that was returned to the client.
-
getAuthUser
public String getAuthUser()
Description copied from interface:HTTPRequestInfoReturns the username that was used to authenticate.- Specified by:
getAuthUserin interfaceHTTPRequestInfo- Returns:
- the authUser
-
setAuthUser
public void setAuthUser(String authUser)
Description copied from interface:HTTPRequestInfoSets the username that was used to authenticate.- Specified by:
setAuthUserin interfaceHTTPRequestInfo- Parameters:
authUser- the authUser to set
-
getStatusCode
public int getStatusCode()
Description copied from interface:HTTPRequestInfoReturns the HTTP status code returned to the client.- Specified by:
getStatusCodein interfaceHTTPRequestInfo- Returns:
- the statusCode
-
getServerAddress
public String getServerAddress()
Description copied from interface:HTTPRequestInfoReturns the server's host.- Specified by:
getServerAddressin interfaceHTTPRequestInfo- Returns:
- the serverAddress
-
getServerHost
public String getServerHost()
Description copied from interface:HTTPRequestInfoReturns the server's host.- Specified by:
getServerHostin interfaceHTTPRequestInfo- Returns:
- the serverHost
-
getServerPort
public int getServerPort()
Description copied from interface:HTTPRequestInfoReturns the server's port.- Specified by:
getServerPortin interfaceHTTPRequestInfo- Returns:
- the serverPort
-
getClientAddress
public String getClientAddress()
Description copied from interface:HTTPRequestInfoReturns the client's address.- Specified by:
getClientAddressin interfaceHTTPRequestInfo- Returns:
- the clientAddress
-
getClientHost
public String getClientHost()
Description copied from interface:HTTPRequestInfoReturns the client's host.- Specified by:
getClientHostin interfaceHTTPRequestInfo- Returns:
- the clientHost
-
getClientPort
public int getClientPort()
Description copied from interface:HTTPRequestInfoReturns the client's port.- Specified by:
getClientPortin interfaceHTTPRequestInfo- Returns:
- the clientPort
-
getProtocol
public String getProtocol()
Description copied from interface:HTTPRequestInfoReturns the protocol used for this request.- Specified by:
getProtocolin interfaceHTTPRequestInfo- Returns:
- the protocol
-
getMethod
public String getMethod()
Description copied from interface:HTTPRequestInfoReturns the HTTP method/verb used for this request.- Specified by:
getMethodin interfaceHTTPRequestInfo- Returns:
- the method
-
getUri
public URI getUri()
Description copied from interface:HTTPRequestInfoReturns the URI issued by the client.- Specified by:
getUriin interfaceHTTPRequestInfo- Returns:
- the URI
-
getUserAgent
public String getUserAgent()
Description copied from interface:HTTPRequestInfoReturns the user agent used by the client.- Specified by:
getUserAgentin interfaceHTTPRequestInfo- Returns:
- the userAgent
-
getConnectionID
public long getConnectionID()
Description copied from interface:HTTPRequestInfoReturns the unique identifier that has been assigned to the client connection for this HTTP request.- Specified by:
getConnectionIDin interfaceHTTPRequestInfo- Returns:
- The unique identifier that has been assigned to the client connection for this HTTP request
-
getTotalProcessingTime
public long getTotalProcessingTime()
Description copied from interface:HTTPRequestInfoReturns the total processing time for this HTTP request.- Specified by:
getTotalProcessingTimein interfaceHTTPRequestInfo- Returns:
- the total processing time for this HTTP request
-
getTransactionId
public String getTransactionId()
Description copied from interface:HTTPRequestInfoReturns the transactionId for this request.- Specified by:
getTransactionIdin interfaceHTTPRequestInfo- Returns:
- the transactionId
-
-