ittp.protocol.request.headers
Class Connection

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

public class Connection
extends Request.Headers

This class analyse the header connection send by the client.

Author:
Frederic Bidon and Mathieu Texier

Field Summary
static boolean CLOSE
           
static boolean OPEN
           
 
Constructor Summary
Connection(Request parent)
          Constructor of the class
 
Method Summary
 boolean getConnection()
          Accessors for the boolean connection.
 boolean isUsed()
          Accessors for the boolean used.
 void setConnection(boolean connection)
          Mutators for the boolean connection.
 java.lang.String toString()
          Convert to a string the headers connection send by the client.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPEN

public static final boolean OPEN
See Also:
Constant Field Values

CLOSE

public static final boolean CLOSE
See Also:
Constant Field Values
Constructor Detail

Connection

public Connection(Request parent)
Constructor of the class

Method Detail

setConnection

public void setConnection(boolean connection)
                   throws ittpException
Mutators for the boolean connection.

Parameters:
connection - boolean that determine if the connection is closed.
Throws:
ittpException - if the headers Connection already received.

getConnection

public boolean getConnection()
Accessors for the boolean connection.

Returns:
connection: boolean that determine if the connection is closed.

toString

public java.lang.String toString()
Convert to a string the headers connection 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.