|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xlightweb.Part
org.xlightweb.HttpRequest
org.xlightweb.GetRequest
public class GetRequest
a GET request
Field Summary |
---|
Fields inherited from interface org.xlightweb.IHttpMessage |
---|
CONNECT_METHOD, DEFAULT_ENCODING, DEFAULT_ENCODING_KEY, DELETE_METHOD, GET_METHOD, HEAD_METHOD, OPTIONS_METHOD, POST_METHOD, PUT_METHOD, TRACE_METHOD |
Constructor Summary | |
---|---|
GetRequest(String url)
constrcutor |
|
GetRequest(String url,
NameValuePair... queryParameters)
constrcutor |
Method Summary | |
---|---|
Object |
getAttribute(String name)
Returns the value of the named attribute as an Object ,
or null if no attribute of the given name exists. |
Enumeration |
getAttributeNames()
Returns an Enumeration containing the
names of the attributes available to this message. |
Set<String> |
getAttributeNameSet()
Returns an Set containing the
names of the attributes available to this messaget. |
int |
getContentLength()
Returns the length, in bytes, of the message body and made available by the input stream, or -1 if the length is not known. |
IHttpMessageHeader |
getMessageHeader()
returns the message header |
void |
removeHopByHopHeaders()
removes all hop-by-hop headers without Transfer-Encoding if set to chunked |
void |
setAttribute(String name,
Object o)
Stores an attribute in this header. |
void |
setContentLength(int length)
sets the content length in bytes |
Methods inherited from class org.xlightweb.Part |
---|
addHeader, addHeaderLine, addHeaderlines, containsHeader, getBlockingBody, getBody, getCharacterEncoding, getContentType, getDisposition, getDispositionParam, getDispositionType, getHeader, getHeaderList, getHeaderNames, getHeaderNameSet, getHeaders, getNonBlockingBody, getPartHeader, getTransferEncoding, hasBody, removeHeader, setContentType, setHeader, setTransferEncoding, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.xlightweb.IHttpMessage |
---|
getAttribute, getAttributeNames, getAttributeNameSet, getCharacterEncoding, getContentLength, getContentType, getMessageHeader, getTransferEncoding, removeHopByHopHeaders, setAttribute, setContentLength, setContentType, setTransferEncoding |
Methods inherited from interface org.xlightweb.IPart |
---|
getBlockingBody, getBody, getNonBlockingBody, getPartHeader, hasBody |
Methods inherited from interface org.xlightweb.IHeader |
---|
addHeader, addHeaderLine, addHeaderlines, containsHeader, getDisposition, getDispositionParam, getDispositionType, getHeader, getHeaderList, getHeaderNames, getHeaderNameSet, getHeaders, removeHeader, setHeader |
Constructor Detail |
---|
public GetRequest(String url) throws MalformedURLException
url
- the url string
MalformedURLException
public GetRequest(String url, NameValuePair... queryParameters) throws MalformedURLException
url
- the url stringqueryParameters
- the query parameters
MalformedURLException
Method Detail |
---|
public final IHttpMessageHeader getMessageHeader()
getMessageHeader
in interface IHttpMessage
public final void setAttribute(String name, Object o)
setAttribute
in interface IHttpMessage
name
- a String
specifying
the name of the attributeo
- the Object
to be storedpublic final Object getAttribute(String name)
Object
,
or null
if no attribute of the given name exists.
getAttribute
in interface IHttpMessage
name
- a String
specifying the name of the attribute
Object
containing the value of the attribute,
or null
if the attribute does not existpublic final Enumeration getAttributeNames()
Enumeration
containing the
names of the attributes available to this message.
This method returns an empty Enumeration
if the message has no attributes available to it.
getAttributeNames
in interface IHttpMessage
Enumeration
of strings containing the names
of the message's attributespublic final Set<String> getAttributeNameSet()
Set
containing the
names of the attributes available to this messaget.
This method returns an empty Set
if the request has no attributes available to it.
getAttributeNameSet
in interface IHttpMessage
Set
of strings
containing the names of the message's attributespublic final int getContentLength()
getContentLength
in interface IHttpMessage
public final void setContentLength(int length)
setContentLength
in interface IHttpMessage
length
- the content length in bytespublic final void removeHopByHopHeaders()
removeHopByHopHeaders
in interface IHttpMessage
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |