public class HttpMessage extends BaseObject implements IhttpMessage, ISupportInitialize, IAdaptable
Modifier and Type | Field and Description |
---|---|
private static ContextLocal<longchar> |
_versions |
private raw |
contentMd5
An MD5 hash of the message's content.
|
private object<? extends IStringKeyedMap> |
cookies
Only cookies relevant to only this message (request or response)
|
private object<? extends _BaseObject_> |
entity
Object containing the response body/entity.
|
private object<? extends HttpHeaderCollection> |
headers
Holds headers for this message
|
private character |
transferEncoding
The message's Transfer-Encoding.
|
private character |
version
The HTTP version supported.
|
Constructor and Description |
---|
HttpMessage() |
Modifier and Type | Method and Description |
---|---|
protected void |
__net_http_HttpMessage_constructor__()
Constructor.
|
void |
__net_http_HttpMessage_destructor__()
Destructor.
|
void |
__net_http_HttpMessage_execute__()
Execute method.
|
void |
clearCookies()
Removes all cookies from this message.
|
void |
clearHeaders()
Removes all headers from this message.
|
void |
destroy()
Destroy.
|
object<? extends _BaseObject_> |
getAdapter(object<? extends LegacyClass> _p1)
Returns an adapter for this message
|
character |
getCharacterEncoding()
Get the message's content encoding.
|
integer |
getContentLength()
Get the message content length.
|
raw |
getContentMd5()
Get an MD5 hash of the message's content.
|
character |
getContentType()
Get message content type.
|
object<? extends Cookie> |
getCookie(character _p1)
Returns a cookie by name from this message.
|
protected object<? extends IStringKeyedMap> |
getCookies()
Get cookies relevant to only this message (request or response).
|
integer |
getCookies(OutputExtentParameter<object<? extends Cookie>> _extpoCookies)
Returns all the cookies for this message.
|
object<? extends _BaseObject_> |
getEntity()
Get an object containing the message body/entity.
|
object<? extends HttpHeader> |
getHeader(character _p1)
Returns a named header.
|
protected object<? extends HttpHeaderCollection> |
getHeaders()
Get the headers of this message.
|
integer |
getHeaders(OutputExtentParameter<object<? extends HttpHeader>> _extp1)
Returns all the headers.
|
character |
getTransferEncoding()
Get the message's Transfer-Encoding.
|
character |
getVersion()
Get the HTTP version supported.
|
logical |
hasCookie(character _p1)
Indicates whether a cookie exists for this message.
|
logical |
hasCookie(object<? extends Cookie> _p1)
Indicates whether a cookie exists for this message.
|
logical |
hasHeader(character _p1)
Indicates whether a header exists for this message or not.
|
void |
initialize()
Initialize
|
void |
removeCookie(character _p1)
Removes coolies from this message for a given name.
|
void |
removeCookie(object<? extends Cookie> _p1)
Removes a cookie from this message.
|
void |
removeHeader(character _p1)
Removes all headers with a given name from the set of message headers.
|
void |
setCharacterEncoding(character _encoding)
Set the message's content encoding.
|
void |
setContentLength(integer _len)
Set the message content length.
|
void |
setContentMd5(raw _var)
Set an MD5 hash of the message's content.
|
void |
setContentType(character _ctype)
Set message content type.
|
void |
setCookie(object<? extends Cookie> _p1)
Adds a cookie to this message
|
void |
setCookies(object<? extends Cookie>[] poCookies) |
void |
setEntity(object<? extends _BaseObject_> _var)
Set an object containing the message body/entity.
|
void |
setHeader(object<? extends HttpHeader> _p1)
Adds header info to this message's collection of headers.
|
void |
setHeaders(object<? extends HttpHeader>[] poHeaders) |
void |
setTransferEncoding(character _var)
Set the message's Transfer-Encoding.
|
void |
setVersion(character _var)
Set the HTTP version supported.
|
__lang_BaseObject_constructor__, __lang_BaseObject_execute__, assertNotNull, assertNotNull, clone, getLegacyClass, getNextSibling, getPrevSibling, legacyEquals, toLegacyString
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
__lang_BaseObject_constructor__, clone, getLegacyClass, getNextSibling, getPrevSibling, isTracked, legacyEquals, toLegacyString
private static ContextLocal<longchar> _versions
private raw contentMd5
private character transferEncoding
private character version
private object<? extends HttpHeaderCollection> headers
private object<? extends _BaseObject_> entity
private object<? extends IStringKeyedMap> cookies
public void __net_http_HttpMessage_execute__()
protected void __net_http_HttpMessage_constructor__()
public void __net_http_HttpMessage_destructor__()
public character getCharacterEncoding()
getCharacterEncoding
in interface IhttpMessage
public void setCharacterEncoding(character _encoding)
setCharacterEncoding
in interface IhttpMessage
_encoding
- the message's content encoding.public integer getContentLength()
getContentLength
in interface IhttpMessage
public void setContentLength(integer _len)
setContentLength
in interface IhttpMessage
_len
- the message content length.public raw getContentMd5()
getContentMd5
in interface IhttpMessage
public void setContentMd5(raw _var)
setContentMd5
in interface IhttpMessage
_var
- an MD5 hash of the message's content.public character getContentType()
getContentType
in interface IhttpMessage
public void setContentType(character _ctype)
setContentType
in interface IhttpMessage
_ctype
- message content type.protected object<? extends IStringKeyedMap> getCookies()
public object<? extends _BaseObject_> getEntity()
getEntity
in interface IhttpMessage
public void setEntity(object<? extends _BaseObject_> _var)
setEntity
in interface IhttpMessage
_var
- an object containing the message body/entity.protected object<? extends HttpHeaderCollection> getHeaders()
public void setHeaders(object<? extends HttpHeader>[] poHeaders)
setHeaders
in interface IhttpMessage
public character getTransferEncoding()
getTransferEncoding
in interface IhttpMessage
public void setTransferEncoding(character _var)
setTransferEncoding
in interface IhttpMessage
_var
- the message's Transfer-Encoding.public character getVersion()
getVersion
in interface IhttpMessage
public void setVersion(character _var)
setVersion
in interface IhttpMessage
_var
- the HTTP version supported.public void clearCookies()
clearCookies
in interface IhttpMessage
public void clearHeaders()
clearHeaders
in interface IhttpMessage
public void destroy()
destroy
in interface ISupportInitialize
public object<? extends _BaseObject_> getAdapter(object<? extends LegacyClass> _p1)
getAdapter
in interface IAdaptable
_p1
- The type we want to adapt this message to.public object<? extends Cookie> getCookie(character _p1)
getCookie
in interface IhttpMessage
_p1
- The cookie's name to check.public integer getCookies(OutputExtentParameter<object<? extends Cookie>> _extpoCookies)
getCookies
in interface IhttpMessage
_extpoCookies
- An array of cookies.public object<? extends HttpHeader> getHeader(character _p1)
getHeader
in interface IhttpMessage
_p1
- The name of the header to retrieve.public integer getHeaders(OutputExtentParameter<object<? extends HttpHeader>> _extp1)
getHeaders
in interface IhttpMessage
_extp1
- An array of headers.public logical hasCookie(character _p1)
hasCookie
in interface IhttpMessage
_p1
- The cookie's name to check.true
if this message contains the cookie.public logical hasCookie(object<? extends Cookie> _p1)
hasCookie
in interface IhttpMessage
_p1
- The cookie to check.true
if this message contains the cookie.public logical hasHeader(character _p1)
hasHeader
in interface IhttpMessage
_p1
- The name of a header to check.true
if this message contains the header.public void initialize()
initialize
in interface ISupportInitialize
public void removeCookie(character _p1)
removeCookie
in interface IhttpMessage
_p1
- The name of the cookie(s) to remove.public void removeCookie(object<? extends Cookie> _p1)
removeCookie
in interface IhttpMessage
_p1
- The cookie to remove.public void removeHeader(character _p1)
removeHeader
in interface IhttpMessage
_p1
- The name of the header to remove.public void setCookie(object<? extends Cookie> _p1)
setCookie
in interface IhttpMessage
_p1
- The cookie to add.public void setCookies(object<? extends Cookie>[] poCookies)
setCookies
in interface IhttpMessage
public void setHeader(object<? extends HttpHeader> _p1)
setHeader
in interface IhttpMessage
_p1
- The header.