| java.lang.Object org.w3c.www.http.HttpMessage
All known Subclasses: org.w3c.www.http.HttpEntityMessage,
HttpMessage | public class HttpMessage implements MimeHeaderHolder,Cloneable,HTTP(Code) | | The basic class for all HTTP messages, as define in the HTTP spec.
This class is the base class for a number of other classes, including
both the ingoing/outgoing requests and replies.
|
Method Summary | |
public void | addConnection(String name) Add the given header name to the Connection header. | public void | addNoCache(String name) Add the given header name to the no-cache directive. | public void | addPragma(String name) Add the given directive to the Pragma header. | public void | addProxyConnection(String name) Add the given header name to the Proxy-Connection header. | public void | addTransferEncoding(String name) Add an encoding token to the given reply stream (ie the body). | public void | addVia(String via) Add a via clause to the via header. | public boolean | checkNoStore() Check the no-store directive of the cache control header. | public boolean | checkOnlyIfCached() Check the only-if-cached directive. | public void | delState(String name) State management - Remove a piece of state from this request. | public void | dump(OutputStream out) | public void | emit(OutputStream out) Emit this message to the given output stream.
This methods emits the given message to the stream, after invoking
the startEmit method. | public void | emit(OutputStream out, int what) Parameters: out - The output stream to emit the message to. | protected void | emitHeaders(OutputStream out, int what) Emit the headers. | protected void | endEmit(OutputStream out, int what) This message has been emited. | public Enumeration | enumerateHeaderDescriptions(boolean all) Enumerate all the available headers for that message.
This method returns an enumeration of HeaderDescription instances,
which you can then use to access most efficiently header values.
Parameters: all - If true the enumeration will coverall headers (even the ones that are not defined for that message)otherwise, it will cover only defined headers. | public Enumeration | enumerateHeaderDescriptions() Enumerate all the headers defined for that message. | protected synchronized String | generateExtNamespace() get a new namespace. | public String | getCManExtHeader(String ext, String header) get the String value of the given header relative to the given
Extension. | public String | getCOptExtHeader(String ext, String header) get the String value of the given header relative to the given
Extension. | public HttpCacheControl | getCacheControl() Header accessor - get the cache control policy. | public HttpMessage | getClone() Get a clone of this HTTP message. | public String[] | getConnection() Header accessor - get the connection header value. | public HttpCookieList | getCookie() Get the cookies attached to that message. | public long | getDate() Header accessor - get the date of this message. | public HttpMessage | getDeeperClone() Get a clone of this HTTP message. | public long | getEmitDate() Get the date at which this message was last emitted, if ever it was. | public String | getExtHeader(String ext, String header) get the String value of the given header relative to the given
Extension. | public HttpExtList | getExtList(String id) | public Dictionary | getExtensionHeaders(HttpExt ext) Get the headers relative to the given Http Extension declaration. | public HeaderValue | getHeaderValue(String name, HeaderValue def) Get a header value, given its name. | final public HeaderValue | getHeaderValue(String name) Get a header value by name.
Parameters: name - The header's name. | final public HeaderValue | getHeaderValue(int idx) Fast access to header value. | public HeaderValue | getHeaderValue(HeaderDescription d) Get a header value, keyed by it's header description.
This is usefull when enumerating headers, by the mean of
enumerateHeaderDescriptions .
Parameters: d - The header description. | public HttpExtList | getHttpCManExtDecl() Get The Mandatory (Hop-by-Hop) Extension declaration list. | public HttpExtList | getHttpCOptExtDecl() Get The Optionnal (Hop-by-Hop) Extension declaration list. | public HttpExtList | getHttpManExtDecl() Get The Mandatory (End-to-End) Extension declaration list. | public HttpExtList | getHttpOptExtDecl() Get The Optionnal (End-to-End) Extension declaration list. | public short | getMajorVersion() Get the major version number of this message.
This method returns the major version that the caller should use to
drive message processing. | public String | getManExtHeader(String ext, String header) get the String value of the given header relative to the given
Extension. | public int | getMaxAge() Get the max-age value for the current cache control. | public short | getMinorVersion() Get the minor version number of this message.
This method returns the minor version that the caller should use
to drive message processing. | public String[] | getNoCache() Get the no-cache directive of the cache control header. | public String | getOptExtHeader(String ext, String header) get the String value of the given header relative to the given
Extension. | public String[] | getPragma() Header accessor - get the pragmas applicable to this message. | public HttpBag | getProtocol() Get the set of protocol extensions that have been applied to that
that message. | public HttpBag | getProtocolInfo() Get the protocol extensions informations carried by this message. | public HttpBag | getProtocolQuery() Get the set of protocol extensions that are queried through this
message. | public HttpBag | getProtocolRequest() Get the set of protocol extensions requested by this message. | public String[] | getProxyConnection() Header accessor - get the proxy connection header value. | public int | getSMaxAge() Get the s-maxage value for the current cache control. | public HttpSetCookieList | getSetCookie() Get the value of the SetCookie header. | public Object | getState(String name) State management - Lookup the value of a state on this request.
Parameters: name - The name of the piece of state to look for. | public Enumeration | getStateNames() Get an enumeration of the states names. | public String[] | getTrailer() | public String[] | getTransferEncoding() Header accessor - get the transfer encoding applying to this message. | public String[] | getUpgrade() Header accessor - get the upgrade header of this message. | public String | getValue(String name) Get a header field value as a String.
Parameters: name - The name of the header. | public String | getValue(HeaderDescription d) Get a header field value as a String.
Parameters: d - The header description. | public String | getVersion() Get the String identifying the HTTP version used for this message. | public String[] | getVia() Header accessor - get the via header of this message. | public boolean | hasConnection(String tok) | public boolean | hasHeader(String name) Probe this message for a defined header.
Parameters: name - The name of the header to check. | public boolean | hasHeader(int idx) Probe this message for a defined header, fast access !
Parameters: idx - The index of the well-known header to check. | public boolean | hasPragma(String pragma) Header accessor - Check for a given pragma.
Parameters: pragma - The pragma to check for. | public boolean | hasProxyConnection(String tok) Does the proxy connection header defines the given token.
Parameters: tok - The token to check for. | public boolean | hasState(String name) | public boolean | hasTransferEncoding(String encoding) Header accessor - Check for a given transfer encoding.
Parameters: encoding - The pragma to check for. | public boolean | notifyBeginParsing(MimeParser parser) MimeHeaderHolder implementation - HTTP message about to be parsed.
No further action is required at this point (we do not distinguish
between request or reply here). | public void | notifyEndParsing(MimeParser parser) MimeHeaderHolder implementation - HTTP message parsing done. | public void | notifyHeader(String name, byte buf, int off, int len) MimeHeaderHolder implementation - The MIME parser callback.
This method is called if the HttpMessage is created by parsing
an input stream. | final public static void | registerExtHeader(String name, String cls) | final protected static void | registerHeader(String name, String cls) | final protected static void | registerHeader(String name, String c, int i) | public void | removeHeader(String name) Remove a header, by name. | final public void | removeHeader(int idx) Remove a header, by address. | public void | setCacheControl(HttpCacheControl control) Header accessor - set the cache control associated with the message. | public void | setConnection(String tokens) Header accessor - set the connection header value. | public void | setCookie(HttpCookieList cookie) Set the cookies attached to this message. | public void | setDate(long date) Header accessor - set the date of this message. | public void | setEnd2EndExtensionAcknowledgmentHeader() | public synchronized void | setExtensionHeader(HttpExt ext, String name, String value) Set an extension header relative to the given extension declaration. | public void | setHeaderValue(String name, HeaderValue value) Set a header value. | public void | setHeaderValue(HeaderDescription d, HeaderValue v) Set a header value, keyed by it's header description. | final public void | setHeaderValue(int idx, HeaderValue value) Fast write accessor to headers.
This method provides a very fast write access to header
values. | public void | setHopByHopExtensionAcknowledgmentHeader() | public void | setHttpCManExtDecl(HttpExtList exts) Set The Mandatory (Hop-by-Hop) Extension declaration list. | public void | setHttpCOptExtDecl(HttpExtList exts) Set The Optional (Hop-by-Hop) Extension declaration list. | public void | setHttpExtDecl(HttpExtList exts) Set the Extension declaration. | public void | setHttpManExtDecl(HttpExtList exts) Set The Mandatory (End-to-End) Extension declaration list. | public void | setHttpOptExtDecl(HttpExtList exts) Set The Optional (End-to-End) Extension declaration list. | public void | setMaxAge(int maxage) Set the max-age value of the associated cache control.
This method hides as much as possible, the difference between
HTTP/1.1 max-age, and HTTP/1.0 expires headers. | protected void | setNamespaces(HttpExtList extl) | public void | setNoCache(String nocache) Set the no-cache directive of the cache control header. | public void | setNoCache() Set the no-cache directive globally. | public void | setNoStore(boolean onoff) Set the no-store directive. | public void | setOnlyIfCached(boolean onoff) Set the only-if-cached directive. | public void | setPragma(String tokens) Header accessor - set the pragmas applicable to this message. | public void | setProtocol(HttpBag bag) Set the protocol extensions applied to that message. | public void | setProtocolInfo(HttpBag bag) Attach protocol extensions informations to that message. | public void | setProtocolQuery(HttpBag bag) Set the protocol extensions queried by that message. | public void | setProtocolRequest(HttpBag bag) Set the protocol extensions required by this message. | public void | setProxyConnection(String tokens) Header accessor - set the proxy connection header value. | public void | setSMaxAge(int smaxage) Set the s-maxage value of the associated cache control. | public void | setSetCookie(HttpSetCookieList setcookie) Set the value of the Set-Cookie header. | public void | setState(String name, Object value) State management - Add a piece of state to this request. | public void | setTrailer(String trailers) | public void | setTransferEncoding(String tokens) Header accessor - set the transfer encoding for this message. | public void | setUpgrade(String products) Header accessor - set the upgrade header of this message. | public void | setValue(String name, String strval) Define a new header field. | public void | setVia(String vias) Header accessor - set the Via header of this message. | protected void | startEmit(OutputStream out, int what) This message is about to be emited. |
EMIT_ALL | final public static int EMIT_ALL(Code) | | |
EMIT_BODY | final public static int EMIT_BODY(Code) | | |
EMIT_FOOTERS | final public static int EMIT_FOOTERS(Code) | | |
EMIT_HEADERS | final public static int EMIT_HEADERS(Code) | | |
H_CACHE_CONTROL | public static int H_CACHE_CONTROL(Code) | | |
H_CMAN_EXT | public static int H_CMAN_EXT(Code) | | |
H_CONNECTION | public static int H_CONNECTION(Code) | | |
H_COOKIE | public static int H_COOKIE(Code) | | |
H_COPT_EXT | public static int H_COPT_EXT(Code) | | |
H_DATE | public static int H_DATE(Code) | | |
H_MAN_EXT | public static int H_MAN_EXT(Code) | | |
H_OPT_EXT | public static int H_OPT_EXT(Code) | | |
H_PRAGMA | public static int H_PRAGMA(Code) | | |
H_PROTOCOL | public static int H_PROTOCOL(Code) | | |
H_PROTOCOL_INFO | public static int H_PROTOCOL_INFO(Code) | | |
H_PROTOCOL_QUERY | public static int H_PROTOCOL_QUERY(Code) | | |
H_PROTOCOL_REQUEST | public static int H_PROTOCOL_REQUEST(Code) | | |
H_PROXY_CONNECTION | public static int H_PROXY_CONNECTION(Code) | | |
H_SET_COOKIE | public static int H_SET_COOKIE(Code) | | |
H_TRAILER | public static int H_TRAILER(Code) | | |
H_TRANSFER_ENCODING | public static int H_TRANSFER_ENCODING(Code) | | |
H_UPGRADE | public static int H_UPGRADE(Code) | | |
H_VIA | public static int H_VIA(Code) | | |
MAX_HEADERS | public static int MAX_HEADERS(Code) | | |
emitdate | protected long emitdate(Code) | | The date at which this message was last emitted.
|
headers | protected Dictionary headers(Code) | | The header value repository.
At this time, I am using this quite inefficient scheme, but the API
have been carefully designed to enable a more efficient implementation.
|
major | protected short major(Code) | | The major version of this message, according to HTTP specs.
|
minor | protected short minor(Code) | | The minoir version of this message, according to HTTP specs.
|
HttpMessage | public HttpMessage()(Code) | | |
addConnection | public void addConnection(String name)(Code) | | Add the given header name to the Connection header.
Parameters: name - The name of the header to add to the Connection header. |
addNoCache | public void addNoCache(String name)(Code) | | Add the given header name to the no-cache directive.
Parameters: name - The header name to add there. |
addPragma | public void addPragma(String name)(Code) | | Add the given directive to the Pragma header.
Parameters: name - The name of the directive to add to the Pragma header. |
addProxyConnection | public void addProxyConnection(String name)(Code) | | Add the given header name to the Proxy-Connection header.
Parameters: name - The name of the header to add to the Proxy-Connection header. |
addTransferEncoding | public void addTransferEncoding(String name)(Code) | | Add an encoding token to the given reply stream (ie the body).
Parameters: name - The name of the encoding to add. |
addVia | public void addVia(String via)(Code) | | Add a via clause to the via header.
Parameters: via - The new via clause. |
checkNoStore | public boolean checkNoStore()(Code) | | Check the no-store directive of the cache control header.
A boolean true if set, falseotherwise. |
checkOnlyIfCached | public boolean checkOnlyIfCached()(Code) | | Check the only-if-cached directive.
A boolean, true if the directive is set,false otherwise. |
delState | public void delState(String name)(Code) | | State management - Remove a piece of state from this request.
Parameters: name - The name of the piece of state to remove. |
emit | public void emit(OutputStream out) throws IOException(Code) | | Emit this message to the given output stream.
This methods emits the given message to the stream, after invoking
the startEmit method. Once the whole message has been
emited, the endEmit method is called back.
Parameters: out - The output stream to emit the message to. exception: IOException - If the message couldn't be emited to thegiven stream, due to IO errors. |
emit | public void emit(OutputStream out, int what) throws IOException(Code) | | Parameters: out - The output stream to emit the message to. Parameters: what - (fixme doc) exception: IOException - If the message couldn't be emited to the given stream, due to IO errors. |
enumerateHeaderDescriptions | public Enumeration enumerateHeaderDescriptions(boolean all)(Code) | | Enumerate all the available headers for that message.
This method returns an enumeration of HeaderDescription instances,
which you can then use to access most efficiently header values.
Parameters: all - If true the enumeration will coverall headers (even the ones that are not defined for that message)otherwise, it will cover only defined headers. An enumeration. |
enumerateHeaderDescriptions | public Enumeration enumerateHeaderDescriptions()(Code) | | Enumerate all the headers defined for that message.
This method returns an enumeration of HeaderDescription instances,
which you can then use to access most efficiently header values.
An enumeration. |
generateExtNamespace | protected synchronized String generateExtNamespace()(Code) | | get a new namespace.
an int. |
getCManExtHeader | public String getCManExtHeader(String ext, String header)(Code) | | get the String value of the given header relative to the given
Extension. This method search the header in the following declarations:
- Mandatory (Hop-by-Hop) Extensions
Parameters: ext - the extension Parameters: header - the extension header a String (or null) |
getCOptExtHeader | public String getCOptExtHeader(String ext, String header)(Code) | | get the String value of the given header relative to the given
Extension. This method search the header in the following declarations:
- Optionnal (hop-by-Hop) Extensions
Parameters: ext - the extension Parameters: header - the extension header a String (or null) |
getCacheControl | public HttpCacheControl getCacheControl()(Code) | | Header accessor - get the cache control policy.
The current cache control policy, or nullif undefined. |
getClone | public HttpMessage getClone()(Code) | | Get a clone of this HTTP message.
An HttpMessage, of the class of the message receiver. |
getConnection | public String[] getConnection()(Code) | | Header accessor - get the connection header value.
The tokens of the connection header, as a String array, ornull if undefined. |
getCookie | public HttpCookieList getCookie()(Code) | | Get the cookies attached to that message.
An instance of HttpCookie holding the list of available cookies, or null if undefined. |
getDate | public long getDate()(Code) | | Header accessor - get the date of this message.
A long giving the date of this message, following the Java runtime convention (milliseconds since epoch), or -1if undefined. |
getDeeperClone | public HttpMessage getDeeperClone()(Code) | | Get a clone of this HTTP message.
It is a semi-deep clone, not a complete one.
An HttpMessage, of the class of the message receiver. |
getEmitDate | public long getEmitDate()(Code) | | Get the date at which this message was last emitted, if ever it was.
The date, in milliseconds since Java epoch at which this messagewas emitted, or -1 if the message was never emitted. |
getExtHeader | public String getExtHeader(String ext, String header)(Code) | | get the String value of the given header relative to the given
Extension. This method search the header in the following declarations:
- Mandatory (End-to-End) Extensions
- Mandatory (Hop-by-Hop) Extensions
- Optionnal (End-to-End) Extensions
- Optionnal (hop-by-Hop) Extensions
Parameters: ext - the extension Parameters: header - the extension header a String (or null) |
getExtList | public HttpExtList getExtList(String id)(Code) | | Get an Http Extension Listfrom the following list:
- Mandatory (End-to-End) Extensions
- Mandatory (Hop-by-Hop) Extensions
- Optionnal (End-to-End) Extensions
- Optionnal (hop-by-Hop) Extensions
Parameters: ext - the Extension id a HttpExtList containing the extension declaration (or null) |
getExtensionHeaders | public Dictionary getExtensionHeaders(HttpExt ext)(Code) | | Get the headers relative to the given Http Extension declaration.
Parameters: ext - the HttpExt a Dictionnary of |
getHeaderValue | public HeaderValue getHeaderValue(String name, HeaderValue def)(Code) | | Get a header value, given its name.
Parameters: name - The name of the field whose value is to be fetched. Parameters: def - The default value if the field is undefined. |
getHeaderValue | final public HeaderValue getHeaderValue(String name)(Code) | | Get a header value by name.
Parameters: name - The header's name. The value of the header, as a String, or nullif undefined. |
getHeaderValue | final public HeaderValue getHeaderValue(int idx)(Code) | | Fast access to header value.
This method provides a very fast access to pre-defined header
values. You can use it on all headers that have an access token.
Parameters: idx - The token of the header to access. An instance of HeaderValue or null if undefined. |
getHeaderValue | public HeaderValue getHeaderValue(HeaderDescription d)(Code) | | Get a header value, keyed by it's header description.
This is usefull when enumerating headers, by the mean of
enumerateHeaderDescriptions .
Parameters: d - The header description. A HeaderValue instance, if the header is defined,null otherwise. |
getHttpCManExtDecl | public HttpExtList getHttpCManExtDecl()(Code) | | Get The Mandatory (Hop-by-Hop) Extension declaration list.
a HttpExtList instance or null; |
getHttpCOptExtDecl | public HttpExtList getHttpCOptExtDecl()(Code) | | Get The Optionnal (Hop-by-Hop) Extension declaration list.
a HttpExtList instance or null; |
getHttpManExtDecl | public HttpExtList getHttpManExtDecl()(Code) | | Get The Mandatory (End-to-End) Extension declaration list.
a HttpExtList instance or null; |
getHttpOptExtDecl | public HttpExtList getHttpOptExtDecl()(Code) | | Get The Optionnal (End-to-End) Extension declaration list.
a HttpExtList instance or null; |
getMajorVersion | public short getMajorVersion()(Code) | | Get the major version number of this message.
This method returns the major version that the caller should use to
drive message processing. It may not match the
version number actually emitted on the wire, which is computed
by the API itself.
A ninteger giving the major version number. |
getManExtHeader | public String getManExtHeader(String ext, String header)(Code) | | get the String value of the given header relative to the given
Extension. This method search the header in the following declarations:
- Mandatory (End-to-End) Extensions
Parameters: ext - the extension Parameters: header - the extension header a String (or null) |
getMaxAge | public int getMaxAge()(Code) | | Get the max-age value for the current cache control.
The max age value, as an integer, or -1 ifundefined. |
getMinorVersion | public short getMinorVersion()(Code) | | Get the minor version number of this message.
This method returns the minor version that the caller should use
to drive message processing. It may not match the
minor version number emitted on the wire, which is computed by the
API itself.
An integer giving the minor version number. |
getNoCache | public String[] getNoCache()(Code) | | Get the no-cache directive of the cache control header.
A list of token (potentially empty) encoded as an array ofString (with 0 length if empty), or null ifundefined. |
getOptExtHeader | public String getOptExtHeader(String ext, String header)(Code) | | get the String value of the given header relative to the given
Extension. This method search the header in the following declarations:
- Optionnal (End-to-End) Extensions
Parameters: ext - the extension Parameters: header - the extension header a String (or null) |
getPragma | public String[] getPragma()(Code) | | Header accessor - get the pragmas applicable to this message.
The pragma tokens applicable to this message, encodedas a String array, or null if undefined. |
getProtocol | public HttpBag getProtocol()(Code) | | Get the set of protocol extensions that have been applied to that
that message.
A bag containing the description of the protocol extensionsapplied to that message, or null. |
getProtocolInfo | public HttpBag getProtocolInfo()(Code) | | Get the protocol extensions informations carried by this message.
A bag containing the description of the protocol extensionsinformations carried by that message, or null. |
getProtocolQuery | public HttpBag getProtocolQuery()(Code) | | Get the set of protocol extensions that are queried through this
message.
A bag containing the description of the protocol extensionsqueried by that message, or null. |
getProtocolRequest | public HttpBag getProtocolRequest()(Code) | | Get the set of protocol extensions requested by this message.
A bag containing the description of the protocol extensionsrequested by this message, or null. |
getProxyConnection | public String[] getProxyConnection()(Code) | | Header accessor - get the proxy connection header value.
The tokens of the connection header, as a String array,or null if undefined. |
getSMaxAge | public int getSMaxAge()(Code) | | Get the s-maxage value for the current cache control.
The s-maxage value, as an integer (seconds), or -1 if undefined. |
getSetCookie | public HttpSetCookieList getSetCookie()(Code) | | Get the value of the SetCookie header.
AN HttpSetCookie instance, or null if undefined. |
getState | public Object getState(String name)(Code) | | State management - Lookup the value of a state on this request.
Parameters: name - The name of the piece of state to look for. An object, if the piece of state is defined, null otherwise. |
getStateNames | public Enumeration getStateNames()(Code) | | Get an enumeration of the states names.
an Enumeration |
getTrailer | public String[] getTrailer()(Code) | | Get this message trailer
A list of encoding tokens, encoded as a String array, or null if undefined. |
getTransferEncoding | public String[] getTransferEncoding()(Code) | | Header accessor - get the transfer encoding applying to this message.
The list of encoding tokens, as a String array, or null if undefined. |
getUpgrade | public String[] getUpgrade()(Code) | | Header accessor - get the upgrade header of this message.
A list of products, encoded as an array of Stringor null if undefined. |
getValue | public String getValue(String name)(Code) | | Get a header field value as a String.
Parameters: name - The name of the header. A String giving the header value, or nullif undefined. |
getValue | public String getValue(HeaderDescription d)(Code) | | Get a header field value as a String.
Parameters: d - The header description. The String value for the given header, or nullif undefined. |
getVersion | public String getVersion()(Code) | | Get the String identifying the HTTP version used for this message.
A String identifying the protocol version. |
getVia | public String[] getVia()(Code) | | Header accessor - get the via header of this message.
A Via array describing each hop of the message, or null if undefined. |
hasConnection | public boolean hasConnection(String tok)(Code) | | Does the connection header include the given token ?
A boolean. |
hasHeader | public boolean hasHeader(String name)(Code) | | Probe this message for a defined header.
Parameters: name - The name of the header to check. true if the header is defined, false otherwise. |
hasHeader | public boolean hasHeader(int idx)(Code) | | Probe this message for a defined header, fast access !
Parameters: idx - The index of the well-known header to check. true if the header is defined, false otherwise. |
hasPragma | public boolean hasPragma(String pragma)(Code) | | Header accessor - Check for a given pragma.
Parameters: pragma - The pragma to check for. A boolean true if this pragma is set, false otherwise. |
hasProxyConnection | public boolean hasProxyConnection(String tok)(Code) | | Does the proxy connection header defines the given token.
Parameters: tok - The token to check for. A boolean. |
hasState | public boolean hasState(String name)(Code) | | State management - Is the given state defined for the message ?
A boolean true if the state is defined, false otherwise. |
hasTransferEncoding | public boolean hasTransferEncoding(String encoding)(Code) | | Header accessor - Check for a given transfer encoding.
Parameters: encoding - The pragma to check for. A boolean true if this encoding is set, false otherwise. |
notifyBeginParsing | public boolean notifyBeginParsing(MimeParser parser) throws HttpParserException, IOException(Code) | | MimeHeaderHolder implementation - HTTP message about to be parsed.
No further action is required at this point (we do not distinguish
between request or reply here). The MIME parsing is to continue normally
so we return false.
Always false to conotinue the MIME parsing. exception: HttpParserException - if parsing failed. exception: IOException - if an IO error occurs. |
notifyHeader | public void notifyHeader(String name, byte buf, int off, int len)(Code) | | MimeHeaderHolder implementation - The MIME parser callback.
This method is called if the HttpMessage is created by parsing
an input stream. Each time the MIME parser detects a new header
field, it calls back this method.
Parameters: name - The name of the header that has been encountered. Parameters: buf - The buffer containing the header value. Parameters: off - The offset of the header value in the above buffer. Parameters: len - The length of the header value in the above buffer. |
registerExtHeader | final public static void registerExtHeader(String name, String cls)(Code) | | |
registerHeader | final protected static void registerHeader(String name, String c, int i)(Code) | | |
removeHeader | public void removeHeader(String name)(Code) | | Remove a header, by name.
Parameters: name - The name of the header to remove. |
removeHeader | final public void removeHeader(int idx)(Code) | | Remove a header, by address.
A fast version of the above.
Parameters: idx - The index of the header to remove. |
setCacheControl | public void setCacheControl(HttpCacheControl control)(Code) | | Header accessor - set the cache control associated with the message.
This method should not be used in general, it's much more preferable
to use the various cache control accessors available.
Parameters: control - The cache control policy, or nullto reset the value. |
setConnection | public void setConnection(String tokens)(Code) | | Header accessor - set the connection header value.
Parameters: tokens - The connection tokens as a String array, or null to reset the value. |
setCookie | public void setCookie(HttpCookieList cookie)(Code) | | Set the cookies attached to this message.
Parameters: cookies - The HttpCookie instance describing the cookies, ornull to reset value. |
setDate | public void setDate(long date)(Code) | | Header accessor - set the date of this message.
Parameters: date - The date of the message, following Java runtime conventions(number of milliseconds since epoch), or -1 toreset the value. |
setEnd2EndExtensionAcknowledgmentHeader | public void setEnd2EndExtensionAcknowledgmentHeader()(Code) | | |
setExtensionHeader | public synchronized void setExtensionHeader(HttpExt ext, String name, String value)(Code) | | Set an extension header relative to the given extension declaration.
Parameters: ext - The extension declaration Parameters: name - the header name Parameters: value - the header value |
setHeaderValue | public void setHeaderValue(String name, HeaderValue value)(Code) | | Set a header value.
Parameters: name - The name of the header to define. Parameters: value - It's HeaderValue. |
setHeaderValue | public void setHeaderValue(HeaderDescription d, HeaderValue v)(Code) | | Set a header value, keyed by it's header description.
Parameters: d - The header description. Parameters: v - The HeaderValue instance, or null toreset the header value. |
setHeaderValue | final public void setHeaderValue(int idx, HeaderValue value)(Code) | | Fast write accessor to headers.
This method provides a very fast write access to header
values. It can be used with any of the headers that have
a pre-defined access token.
Parameters: idx - The access token of the header's to write to. Parameters: value - The new header value. |
setHopByHopExtensionAcknowledgmentHeader | public void setHopByHopExtensionAcknowledgmentHeader()(Code) | | |
setHttpCManExtDecl | public void setHttpCManExtDecl(HttpExtList exts)(Code) | | Set The Mandatory (Hop-by-Hop) Extension declaration list.
Parameters: exts - the extension declaration list. |
setHttpCOptExtDecl | public void setHttpCOptExtDecl(HttpExtList exts)(Code) | | Set The Optional (Hop-by-Hop) Extension declaration list.
Parameters: exts - the extension declaration list. |
setHttpExtDecl | public void setHttpExtDecl(HttpExtList exts)(Code) | | Set the Extension declaration.
WARNING: The ManOpt flag of exts must have been set.
Parameters: exts - the extension declaration list. |
setHttpManExtDecl | public void setHttpManExtDecl(HttpExtList exts)(Code) | | Set The Mandatory (End-to-End) Extension declaration list.
Parameters: exts - the extension declaration list. |
setHttpOptExtDecl | public void setHttpOptExtDecl(HttpExtList exts)(Code) | | Set The Optional (End-to-End) Extension declaration list.
Parameters: exts - the extension declaration list. |
setMaxAge | public void setMaxAge(int maxage)(Code) | | Set the max-age value of the associated cache control.
This method hides as much as possible, the difference between
HTTP/1.1 max-age, and HTTP/1.0 expires headers. It will set only
the appropriate one.
Parameters: maxage - The max-age value, or -1 to reset the value. |
setNoCache | public void setNoCache(String nocache)(Code) | | Set the no-cache directive of the cache control header.
Parameters: nocache - A list of headers name encoded as an array of String(of length possibly 0), or nullto reset the value. |
setNoCache | public void setNoCache()(Code) | | Set the no-cache directive globally.
|
setNoStore | public void setNoStore(boolean onoff)(Code) | | Set the no-store directive.
Parameters: onoff - Turn it on or off. |
setOnlyIfCached | public void setOnlyIfCached(boolean onoff)(Code) | | Set the only-if-cached directive.
Parameters: onoff - Turn it on or off. |
setPragma | public void setPragma(String tokens)(Code) | | Header accessor - set the pragmas applicable to this message.
Parameters: tokens - The pragma tokens as a String array, or null to reset the value. |
setProtocol | public void setProtocol(HttpBag bag)(Code) | | Set the protocol extensions applied to that message.
Parameters: protocols - A bag instance, describing the protocol extensionsapplied to the message, or null to reset previousvalue. |
setProtocolInfo | public void setProtocolInfo(HttpBag bag)(Code) | | Attach protocol extensions informations to that message.
Parameters: protocols - A bag instance, describing the protocol extensionsinformations to attach to the message, or null to reset previous value. |
setProtocolQuery | public void setProtocolQuery(HttpBag bag)(Code) | | Set the protocol extensions queried by that message.
Parameters: protocols - A bag instance, describing the protocol extensionsqueried by the message, or null to reset previousvalue. |
setProtocolRequest | public void setProtocolRequest(HttpBag bag)(Code) | | Set the protocol extensions required by this message.
Parameters: protocols - A bag instance, describing the protocol extensionsrequired by the message, or null to reset previousvalue. |
setProxyConnection | public void setProxyConnection(String tokens)(Code) | | Header accessor - set the proxy connection header value.
Parameters: tokens - The connection tokens as a String array, ornull to reset the value. |
setSMaxAge | public void setSMaxAge(int smaxage)(Code) | | Set the s-maxage value of the associated cache control.
Set the s-maxage value on an HTTP/1.1 reply
Parameters: maxage - The max-age value in seconds, or -1to reset the value. |
setSetCookie | public void setSetCookie(HttpSetCookieList setcookie)(Code) | | Set the value of the Set-Cookie header.
Parameters: setcookies - The HttpSetCookie value. |
setState | public void setState(String name, Object value)(Code) | | State management - Add a piece of state to this request.
If the piece of state already exists, it is overriden by the new
value.
Parameters: name - The name of the piece of state to define. Parameters: value - It's corresponding value, or null toreset the value. |
setTrailer | public void setTrailer(String trailers)(Code) | | Set this message trailer
Parameters: encodings - A list of encoding tokens, encoded as a String arrayor null to reset the value. |
setTransferEncoding | public void setTransferEncoding(String tokens)(Code) | | Header accessor - set the transfer encoding for this message.
This just sets the transfer encoding, it is up to the rest of the
application to make sure that the encoding is actually applied
at emiting time.
Parameters: tokens - The transfer encoding tokens as a String array, ornull to reset the value. |
setUpgrade | public void setUpgrade(String products)(Code) | | Header accessor - set the upgrade header of this message.
Parameters: products - An array of products you want this message to carryor null to reset the value. |
setValue | public void setValue(String name, String strval)(Code) | | Define a new header field.
Parameters: name - The name of the header to be defined or reset. Parameters: value - It's String value, or null to resetthe value. |
setVia | public void setVia(String vias)(Code) | | Header accessor - set the Via header of this message.
Parameters: vias - The hops to be placed in the Via header, ornull to reset the value. |
startEmit | protected void startEmit(OutputStream out, int what) throws IOException(Code) | | This message is about to be emited.
Take any appropriate actions.
exception: IOException - if an IO error occurs. |
|
|