|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectittp.protocol.Protocol
ittp.protocol.request.Request
This class build the request send by the client.
Nested Class Summary | |
class |
Request.Headers
Abstract class headers that allows to build the different headers for the request. |
Field Summary | |
static java.lang.String |
CONNECTION
Declaration of the different headers send in a request |
static java.lang.String |
DATE
|
static int |
GET
Attribute a value to each method for differenciate them. |
static int |
HEAD
|
static java.lang.String |
HOST
|
protected int |
Id
|
static java.lang.String[] |
methodName
Creation of a string array containing the different method that can be used. |
static java.lang.String |
MODIFIED_SINCE
|
static int |
OPTIONS
|
static java.lang.String |
RANGE
|
static int |
TRACE
|
Fields inherited from class ittp.protocol.Protocol |
dateFormat, ITTP_version, VERSION |
Constructor Summary | |
Request()
|
Method Summary | |
java.io.File |
getFile()
Accessors that allows to return the name of file requested by the client. |
Request.Headers |
getHeaders(java.lang.String headerString)
Accessor for the object Headers of request |
java.net.InetAddress |
getIP()
Accessors that allows to return the IP requested by the client. |
abstract void |
process(Response response)
|
void |
setHost(java.lang.String host)
Mutators for the String host. |
void |
setIP(java.net.InetAddress clientIP)
Mutators for the ClientIP. |
void |
setPath(java.lang.String RelativePath)
Mutators for the String RelativePath. |
void |
setPort(int port)
Mutators for the int port. |
void |
setSheme(java.lang.String sheme)
Mutators for the String sheme. |
java.net.InetAddress |
toIP(java.lang.String host)
|
java.lang.String |
toString()
Convert to a string the headers request. |
Methods inherited from class ittp.protocol.Protocol |
getITTP_version, setITTP_version |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String CONNECTION
public static final java.lang.String DATE
public static final java.lang.String HOST
public static final java.lang.String MODIFIED_SINCE
public static final java.lang.String RANGE
public static final int GET
public static final int HEAD
public static final int OPTIONS
public static final int TRACE
public static final java.lang.String[] methodName
protected int Id
Constructor Detail |
public Request()
Method Detail |
public abstract void process(Response response)
public Request.Headers getHeaders(java.lang.String headerString)
headerString
- String containing the name of the header.
public java.io.File getFile()
public java.net.InetAddress getIP()
public void setIP(java.net.InetAddress clientIP)
clientIP
- InetAddress that contain the IP address.public void setSheme(java.lang.String sheme)
sheme
- String that contain the protocol use to communicate.public java.net.InetAddress toIP(java.lang.String host)
public void setHost(java.lang.String host)
host
- String that the name of the host requested by the client.public void setPort(int port)
port
- int that determine the number of port used to communicate.public void setPath(java.lang.String RelativePath)
RelativePath
- String that determines relative path.public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |