|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||

public interface IHttpMessage
Http Message
| Field Summary | |
|---|---|
static String |
CONNECT_METHOD
|
static String |
DEFAULT_ENCODING
|
static String |
DEFAULT_ENCODING_KEY
|
static String |
DELETE_METHOD
|
static String |
GET_METHOD
|
static String |
HEAD_METHOD
|
static String |
OPTIONS_METHOD
|
static String |
POST_METHOD
|
static String |
PUT_METHOD
|
static String |
TRACE_METHOD
|
| 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. |
String |
getCharacterEncoding()
Returns the name of the character encoding used in the body of this message. |
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. |
String |
getContentType()
Returns the MIME type of the body of the messag, or null if the type is not known. |
IHttpMessageHeader |
getMessageHeader()
returns the message header |
String |
getProtocol()
Returns the name and version of the protocol the message uses in the form protocol/majorVersion.minorVersion, for example, HTTP/1.1. |
String |
getProtocolVersion()
Returns the version of the protocol the message uses in the form majorVersion.minorVersion, for example, 1.1. |
String |
getTransferEncoding()
returns the Transfer-Encoding header parameter or null if the header is not set |
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 |
void |
setContentType(String type)
sets the MIME type of the body of the message |
void |
setTransferEncoding(String transferEncoding)
sets the Transfer-Encoding parameter |
| 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, getHeader, getHeaderList, getHeaderNames, getHeaderNameSet, getHeaders, removeHeader, setHeader |
| Field Detail |
|---|
static final String DEFAULT_ENCODING_KEY
static final String DEFAULT_ENCODING
static final String GET_METHOD
static final String POST_METHOD
static final String HEAD_METHOD
static final String PUT_METHOD
static final String DELETE_METHOD
static final String TRACE_METHOD
static final String CONNECT_METHOD
static final String OPTIONS_METHOD
| Method Detail |
|---|
int getContentLength()
void setContentLength(int length)
length - the content length in bytesvoid setContentType(String type)
setContentType in interface IHeadertype - the MIME type of the body of the messageString getContentType()
null if the type is not known.
getContentType in interface IHeaderString containing the name of the MIME type of
the message, or null if the type is not knownString getTransferEncoding()
null if the header is not set
getTransferEncoding in interface IHeadernull if the header is not setvoid setTransferEncoding(String transferEncoding)
setTransferEncoding in interface IHeadertransferEncoding - the Transfer-Encoding parameterString getCharacterEncoding()
getCharacterEncoding in interface IHeaderString containing the name of the character encodingIHttpMessageHeader getMessageHeader()
String getProtocol()
String getProtocolVersion()
void setAttribute(String name,
Object o)
name - a String specifying
the name of the attributeo - the Object to be storedObject getAttribute(String name)
Object,
or null if no attribute of the given name exists.
name - a String specifying the name of the attribute
Object containing the value of the attribute,
or null if the attribute does not existEnumeration 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.
Enumeration of strings containing the names
of the message's attributesSet<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.
Set of strings
containing the names of the message's attributesvoid removeHopByHopHeaders()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||