ittp.protocol.parser
Class RequestParser

java.lang.Object
  extended byittp.protocol.parser.RequestParser

public class RequestParser
extends java.lang.Object

The aim of this class is to parse the request send by the client.

Author:
Frederic Bidon and Mathieu Texier

Constructor Summary
RequestParser(java.io.BufferedReader in, java.net.InetAddress clientIP)
          Create an instance of the RequestParse we assume the bufferReader is ready param in InputStream to be parse param clientIP address of the client
 
Method Summary
(package private)  void host()
          This method analyse the host of the client.
(package private)  void ITTP_version()
          This method analyse the ITTP version used by the client.
 Request parse()
           
(package private)  void path()
          This method analyse the path of the ressource contained in the request.
(package private)  void port()
          This method analyse the port required by the client.
(package private)  void request_URI()
           
(package private)  void sheme()
          This method analyse the sheme.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RequestParser

public RequestParser(java.io.BufferedReader in,
                     java.net.InetAddress clientIP)
Create an instance of the RequestParse we assume the bufferReader is ready param in InputStream to be parse param clientIP address of the client

Method Detail

request_URI

void request_URI()

sheme

void sheme()
This method analyse the sheme.


host

void host()
This method analyse the host of the client. It throws an exception if the host is not expected.


port

void port()
This method analyse the port required by the client. It throws an exception if the port is not expected.


path

void path()
This method analyse the path of the ressource contained in the request. It throws an exception if the path is not expected.


ITTP_version

void ITTP_version()
This method analyse the ITTP version used by the client. It throw an exception if the version is not expected.


parse

public Request parse()
Returns:
the parsed request.