net.sourceforge.pebble.logging
Class LogEntry

java.lang.Object
  extended by net.sourceforge.pebble.logging.LogEntry

public class LogEntry
extends java.lang.Object

Represents an entry (line) in a log file.

Author:
Simon Brown

Constructor Summary
LogEntry()
           
 
Method Summary
 java.lang.String getAgent()
          Gets the user agent (e.g.
 long getBytes()
          Gets the number of bytes sent.
 java.util.Date getDate()
          Gets the date.
 java.lang.String getHost()
          Gets the host (an IP address or DNS name).
 java.lang.String getReferer()
          Gets the referer.
 java.lang.String getRequest()
          Gets the request.
 java.lang.String getRequestMethod()
          Gets just the method portion of the request.
 java.lang.String getRequestUri()
          Gets just the URI portion of the request.
 int getStatusCode()
          Gets the HTTP status code.
 void setAgent(java.lang.String agent)
          Sets the user agent.
 void setBytes(long bytes)
          Sets the number of bytes sent.
 void setDate(java.util.Date date)
          Sets the date.
 void setHost(java.lang.String host)
          Sets the host (an IP address or DNS name).
 void setReferer(java.lang.String referer)
          Sets the referer.
 void setRequest(java.lang.String request)
          Sets the request.
 void setStatusCode(int statusCode)
          Sets the HTTP status code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogEntry

public LogEntry()
Method Detail

getHost

public java.lang.String getHost()
Gets the host (an IP address or DNS name).

Returns:
the host as a String

setHost

public void setHost(java.lang.String host)
Sets the host (an IP address or DNS name).

Parameters:
host - the host as a String

getDate

public java.util.Date getDate()
Gets the date.

Returns:
a Date

setDate

public void setDate(java.util.Date date)
Sets the date.

Parameters:
date - a Date instance

getRequest

public java.lang.String getRequest()
Gets the request.

Returns:
the request as a String

getRequestMethod

public java.lang.String getRequestMethod()
Gets just the method portion of the request.

Returns:
the request method as a String

getRequestUri

public java.lang.String getRequestUri()
Gets just the URI portion of the request.

Returns:
the request URI as a String

setRequest

public void setRequest(java.lang.String request)
Sets the request.

Parameters:
request - the HTTP request as a String

getStatusCode

public int getStatusCode()
Gets the HTTP status code.

Returns:
the status code as an int (-1 if not set)

setStatusCode

public void setStatusCode(int statusCode)
Sets the HTTP status code.

Parameters:
statusCode - the status code

getBytes

public long getBytes()
Gets the number of bytes sent.

Returns:
the number of bytes as a long (-1 if not set)

setBytes

public void setBytes(long bytes)
Sets the number of bytes sent.

Parameters:
bytes - the number of bytes sent

getReferer

public java.lang.String getReferer()
Gets the referer.

Returns:
the refering URL as a String

setReferer

public void setReferer(java.lang.String referer)
Sets the referer.

Parameters:
referer - the refering URL as a String

getAgent

public java.lang.String getAgent()
Gets the user agent (e.g. Mozilla, Internet Explorer, Safari, etc).

Returns:
the user agent as a String

setAgent

public void setAgent(java.lang.String agent)
Sets the user agent.

Parameters:
agent - the user agent as a String


Copyright © 2003-2006, Simon Brown. All Rights Reserved.