be.unamur.inference.web.apache
Class ApacheUserRequest

java.lang.Object
  extended by be.unamur.inference.web.UserRequest
      extended by be.unamur.inference.web.apache.ApacheUserRequest

public class ApacheUserRequest
extends UserRequest

This class represent a UserRequest as recorded by Apache in Apache web logs (see http://httpd.apache.org/docs/ for the different log formats and their contents).

Author:
Xavier Devroey - xavier.devroey@unamur.be

Constructor Summary
ApacheUserRequest(String client, Date time, String requestType, String resource, String[] parameters, String[] parametersValues)
          Creates a new Apache UserRequest with minimal information needed for a request.
ApacheUserRequest(String client, Date time, String requestType, String resource, String[] parameters, String[] parametersValues, int statusCode, int objSize)
          Creates a new Apache UserRequest with the additional information recorded in Apache web logs.
ApacheUserRequest(String client, Date time, String requestType, String resource, String[] parameters, String[] parametersValues, int statusCode, int objSize, String referrer, String userAgent)
          Creates a new Apache UserRequest with the additional information recorded in Apache web logs.
 
Method Summary
 int getObjSize()
          Returns the size of the requested object.
 String getReferrer()
          Returns the referrer of the request
 int getStatusCode()
          Returns the status code of the request.
 String getUserAgent()
          Returns the UserAgent of the request.
 void setObjSize(int objSize)
          Sets the size of the requested object.
 void setReferrer(String referrer)
          Sets the referrer of the request.
 void setStatusCode(int statusCode)
          Sets the status code of the request.
 void setUserAgent(String userAgent)
          Sets the user agent of the request.
 String toString()
           
 
Methods inherited from class be.unamur.inference.web.UserRequest
getClient, getParameters, getParametersValues, getRequestType, getResource, getTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ApacheUserRequest

public ApacheUserRequest(String client,
                         Date time,
                         String requestType,
                         String resource,
                         String[] parameters,
                         String[] parametersValues)
Creates a new Apache UserRequest with minimal information needed for a request.

Parameters:
client - The client issuing the request (e.g., IP adresss or host name).
time - The time at which the request has been issued.
requestType - The type of the request (e.g., HEAD, POST, GET)
resource - The requested resource.
parameters - The parameters provided when the request is made. Has to be the same size as parametersValues.
parametersValues - The parameters values when the request is made. Has to be the same size as parameters.

ApacheUserRequest

public ApacheUserRequest(String client,
                         Date time,
                         String requestType,
                         String resource,
                         String[] parameters,
                         String[] parametersValues,
                         int statusCode,
                         int objSize)
Creates a new Apache UserRequest with the additional information recorded in Apache web logs.

Parameters:
client - The client issuing the request (e.g., IP adresss or host name).
time - The time at which the request has been issued.
requestType - The type of the request (e.g., HEAD, POST, GET)
resource - The requested resource.
parameters - The parameters provided when the request is made. Has to be the same size as parametersValues.
parametersValues - The parameters values when the request is made. Has to be the same size as parameters.
statusCode - The status code of the request.
objSize - The size of the requested object.

ApacheUserRequest

public ApacheUserRequest(String client,
                         Date time,
                         String requestType,
                         String resource,
                         String[] parameters,
                         String[] parametersValues,
                         int statusCode,
                         int objSize,
                         String referrer,
                         String userAgent)
Creates a new Apache UserRequest with the additional information recorded in Apache web logs.

Parameters:
client - The client issuing the request (e.g., IP adresss or host name).
time - The time at which the request has been issued.
requestType - The type of the request (e.g., HEAD, POST, GET)
resource - The requested resource.
parameters - The parameters provided when the request is made. Has to be the same size as parametersValues.
parametersValues - The parameters values when the request is made. Has to be the same size as parameters.
statusCode - The status code of the request.
objSize - The size of the requested object.
referrer - The referrer of the user request.
userAgent - The user agent of the user request.
Method Detail

getStatusCode

public int getStatusCode()
Returns the status code of the request.


getObjSize

public int getObjSize()
Returns the size of the requested object.


getReferrer

public String getReferrer()
Returns the referrer of the request


getUserAgent

public String getUserAgent()
Returns the UserAgent of the request.


setStatusCode

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

Parameters:
statusCode - The new status code.

setObjSize

public void setObjSize(int objSize)
Sets the size of the requested object.

Parameters:
objSize - The new size of the requested object.

setReferrer

public void setReferrer(String referrer)
Sets the referrer of the request.

Parameters:
referrer - The new referrer of the request.

setUserAgent

public void setUserAgent(String userAgent)
Sets the user agent of the request.

Parameters:
userAgent - The new user agent of the request.

toString

public String toString()
Overrides:
toString in class UserRequest


Copyright © 2014 PReCISE, University of Namur. All rights reserved.