ittp.protocol.request.headers
Class Host

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

public class Host
extends Request.Headers

This class analyse the header host send by the client.

Author:
Frederic Bidon and Mathieu Texier

Constructor Summary
Host(Request parent)
          Constructor of the class
 
Method Summary
 java.lang.String getHostName()
          Accessors for the String hostName.
 boolean isUsed()
          Accessors for the boolean used.
 void setHostName(java.lang.String hostName)
          Mutators for the String hostName.
 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

Host

public Host(Request parent)
Constructor of the class

Method Detail

setHostName

public void setHostName(java.lang.String hostName)
                 throws ittpException
Mutators for the String hostName.

Parameters:
hostName - String that contain the name of the host.
Throws:
ittpException - if the host already exist or if the host does not match.

getHostName

public java.lang.String getHostName()
Accessors for the String hostName.

Returns:
hostName: String that the name of the host.

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.