edu.internet2.middleware.shibboleth.common.log
Class AccessLogEntry

java.lang.Object
  extended by edu.internet2.middleware.shibboleth.common.log.AccessLogEntry

public class AccessLogEntry
extends Object

Data object for generating server access logs.


Field Summary
static String ACCESS_LOGGER_NAME
          Name of the Shibboleth Access logging category.
private static org.joda.time.format.DateTimeFormatter dateFormatter
          Formatter used to convert timestamps to strings.
private  String remoteHost
          Hostname or IP address of the remote host.
private  String requestPath
          Path of the request.
private  org.joda.time.DateTime requestTime
          Request timestamp.
private  String serverHost
          Hostname or IP address of the server.
private  int serverPort
          Port the request came in on.
 
Constructor Summary
AccessLogEntry(javax.servlet.http.HttpServletRequest request)
          Constructor.
AccessLogEntry(String remote, String host, int port, String path)
          Constructor.
 
Method Summary
 String getRemoteHost()
          Gets the remote client host or IP address.
 String getRequestPath()
          Gets the request path without servlet context information.
 org.joda.time.DateTime getRequestTime()
          Gets the time the request was made.
 String getServerHost()
          Gets the server's host name or IP address.
 int getServerPort()
          Gets the server's port number.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ACCESS_LOGGER_NAME

public static final String ACCESS_LOGGER_NAME
Name of the Shibboleth Access logging category.

See Also:
Constant Field Values

dateFormatter

private static org.joda.time.format.DateTimeFormatter dateFormatter
Formatter used to convert timestamps to strings.


requestTime

private org.joda.time.DateTime requestTime
Request timestamp.


remoteHost

private String remoteHost
Hostname or IP address of the remote host.


serverHost

private String serverHost
Hostname or IP address of the server.


serverPort

private int serverPort
Port the request came in on.


requestPath

private String requestPath
Path of the request.

Constructor Detail

AccessLogEntry

public AccessLogEntry(javax.servlet.http.HttpServletRequest request)
Constructor.

Parameters:
request - the request

AccessLogEntry

public AccessLogEntry(String remote,
                      String host,
                      int port,
                      String path)
Constructor.

Parameters:
remote - the remote client host name or IP
host - the servers host name or IP
port - the servers port number
path - the request path informatio minus the servlet context information
Method Detail

getRemoteHost

public String getRemoteHost()
Gets the remote client host or IP address.

Returns:
remote client host or IP address

getRequestPath

public String getRequestPath()
Gets the request path without servlet context information.

Returns:
request path without servlet context information

getRequestTime

public org.joda.time.DateTime getRequestTime()
Gets the time the request was made.

Returns:
time the request was made

getServerHost

public String getServerHost()
Gets the server's host name or IP address.

Returns:
server's host name or IP address

getServerPort

public int getServerPort()
Gets the server's port number.

Returns:
server's port number

toString

public String toString()

Overrides:
toString in class Object


Copyright © 1999-2012. All Rights Reserved.