ittp.protocol.request.headers
Class Date

java.lang.Object
  extended byittp.protocol.request.Request.Headers
      extended byittp.protocol.request.headers.Date

public class Date
extends Request.Headers

This class analyse the header connection send by the client.

Author:
Frederic Bidon and Mathieu Texier

Constructor Summary
Date(Request parent)
          Constructor of the class
 
Method Summary
 java.lang.String getDateTime()
          Accessors for the boolean used.
 boolean isUsed()
          Accessors for the boolean used.
 void setDateTime(java.lang.String dateText)
          Mutators for the String dateText.
 java.lang.String toString()
          Convert to a string the headers date send by the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Date

public Date(Request parent)
Constructor of the class

Method Detail

setDateTime

public void setDateTime(java.lang.String dateText)
                 throws ittpException
Mutators for the String dateText. This method convert the date to the dateFormat.

Parameters:
dateText - String that contains the date when the request has been send.
Throws:
ittpException - if the headers DateTime already received or if the format of the date is incorrect or if the request is old than 10 minutes.

getDateTime

public java.lang.String getDateTime()
Accessors for the boolean used.

Returns:
used: boolean that determine if this headers is used.

toString

public java.lang.String toString()
Convert to a string the headers date send by the client.

Specified by:
toString in class Request.Headers
Returns:
a string containing the response to this headers if it is used.

isUsed

public boolean isUsed()
Accessors for the boolean used.

Specified by:
isUsed in class Request.Headers
Returns:
used: boolean that determine if this headers is used.