|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.grizzly.http.HttpHeader
org.glassfish.grizzly.http.HttpRequestPacket
public abstract class HttpRequestPacket
The HttpHeader object, which represents HTTP request message.
HttpHeader,
HttpResponsePacket| Nested Class Summary | |
|---|---|
static class |
HttpRequestPacket.Builder
HttpRequestPacket message builder. |
| Field Summary |
|---|
| Fields inherited from class org.glassfish.grizzly.http.HttpHeader |
|---|
charEncoding, charEncodingParsed, contentLength, contentType, contentTypeParsed, headers, isChunked, isCommitted, isExpectContent, isSkipRemainder, parsedProtocol, protocolBC, secure, upgrade |
| Constructor Summary | |
|---|---|
protected |
HttpRequestPacket()
|
| Method Summary | |
|---|---|
static HttpRequestPacket.Builder |
builder()
Returns HttpRequestPacket builder. |
Connection |
getConnection()
|
String |
getLocalAddress()
|
String |
getLocalHost()
|
String |
getLocalName()
|
int |
getLocalPort()
|
String |
getMethod()
Get the HTTP request method. |
BufferChunk |
getMethodBC()
Get the HTTP request method as BufferChunk
(avoiding creation of a String object). |
String |
getQueryString()
Returns the query string that is contained in the request URL after the path. |
BufferChunk |
getQueryStringBC()
Returns the query string that is contained in the request URL after the path. |
String |
getRemoteAddress()
|
String |
getRemoteHost()
|
int |
getRemotePort()
|
String |
getRequestURI()
Returns the request URL. |
RequestURIRef |
getRequestURIRef()
Returns the request URL of the HTTP request as RequestURIRef
(avoiding creation of a String object). |
HttpResponsePacket |
getResponse()
|
int |
getServerPort()
|
boolean |
isRequest()
Returns true, if the current HttpHeader represent HTTP request message, or false otherwise. |
BufferChunk |
localAddr()
|
BufferChunk |
localName()
|
BufferChunk |
remoteAddr()
|
BufferChunk |
remoteHost()
|
boolean |
requiresAcknowledgement()
|
protected void |
requiresAcknowledgement(boolean requiresAcknowledgement)
Allows consumers of this request to be notified if the user-agent requires acknowledgment of an expectation (i.e., the Expect header). |
protected void |
reset()
Reset the internal state. |
BufferChunk |
serverName()
Return the buffer holding the server name, if any. |
void |
setConnection(Connection connection)
|
void |
setLocalHost(String host)
Set the host name of the server servicing this request. |
void |
setLocalPort(int port)
Sets the Internet Protocol (IP) port number of the interface on which the request was received. |
void |
setMethod(String method)
Set the HTTP request method. |
void |
setQueryString(String query)
Set the query portion of the request URI. |
void |
setRemotePort(int port)
Sets the Internet Protocol (IP) source port of the client or last proxy that sent the request. |
void |
setRequestURI(String requestURI)
Set the request URL. |
void |
setServerPort(int serverPort)
Sets the Internet Protocol (IP) port specified in the Host request header. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected HttpRequestPacket()
| Method Detail |
|---|
public static HttpRequestPacket.Builder builder()
HttpRequestPacket builder.
HttpRequestPacket.Builder.public void setConnection(Connection connection)
public Connection getConnection()
public HttpResponsePacket getResponse()
public BufferChunk getMethodBC()
BufferChunk
(avoiding creation of a String object). The result format is "GET|POST...".
BufferChunk
(avoiding creation of a String object). The result format is "GET|POST...".public String getMethod()
public void setMethod(String method)
method - the HTTP request method. Format is "GET|POST...".public RequestURIRef getRequestURIRef()
RequestURIRef
(avoiding creation of a String object).
RequestURIRef
(avoiding creation of a String object).public String getRequestURI()
public void setRequestURI(String requestURI)
requestURI - the request URL.public BufferChunk getQueryStringBC()
BufferChunk (avoifing creation of a
String object).
BufferChunk (avoifing creation of a
String object).public String getQueryString()
public void setQueryString(String query)
query portion of the request URI.
query - the query Stringpublic BufferChunk serverName()
public int getServerPort()
Host request header.public void setServerPort(int serverPort)
Host request header.
serverPort - the port as specified in the Host
request headerpublic BufferChunk remoteAddr()
BufferChunk representing the Internet Protocol (IP)
address of the client or last proxy that sent the request.public String getRemoteAddress()
public BufferChunk remoteHost()
BufferChunk representing the fully qualified
name of the client or the last proxy that sent the request. If the
engine cannot or chooses not to resolve the hostname (to improve
performance), this method returns the the IP address.public String getRemoteHost()
String representing the fully qualified name of
the client or the last proxy that sent the request. If the engine cannot
or chooses not to resolve the hostname (to improve performance), this
method returns the the IP address.protected void requiresAcknowledgement(boolean requiresAcknowledgement)
requiresAcknowledgement - true if expectation
processing is required.public boolean requiresAcknowledgement()
true if this request requires acknowledgement.public BufferChunk localName()
BufferChunk representing the host name of the
Internet Protocol (IP) interface on which the request was received.public String getLocalName()
String representing the host name of the
Internet Protocol (IP) interface on which the request was received.public BufferChunk localAddr()
BufferChunk representing the Internet Protocol (IP)
address of the interface on which the request was received.public String getLocalAddress()
String representing the Internet Protocol (IP)
address of the interface on which the request was received.public int getRemotePort()
public void setRemotePort(int port)
port - the source port of the clientpublic int getLocalPort()
public void setLocalPort(int port)
port - the port on which the request was receivedpublic String getLocalHost()
public void setLocalHost(String host)
host - the host name of the server servicing this request.protected void reset()
reset in class HttpHeaderpublic final boolean isRequest()
isRequest in class HttpHeaderpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||