|
|||||||||
| Home >> All >> juju >> reattore >> protocol >> http >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
juju.reattore.protocol.http.impl
Class BaseHttpRequest

java.lang.Objectjuju.reattore.protocol.http.impl.BaseHttpRequest
- All Implemented Interfaces:
- juju.reattore.protocol.http.HttpMessage, juju.reattore.protocol.http.HttpRequest
- public class BaseHttpRequest
- extends java.lang.Object
- implements juju.reattore.protocol.http.HttpRequest
- extends java.lang.Object
HTTP request implementation. Wraps a HTTP parser and provides the request access methods. Also acts as a proxy, only resolving certain fields as required.
| Field Summary | |
private juju.reattore.io.ByteSource |
body
|
private java.util.Map |
headers
|
private java.lang.String |
method
|
private java.lang.String |
originalPath
|
private java.lang.String |
path
|
private java.lang.String |
query
|
private static java.util.IdentityHashMap |
TLC
|
private java.lang.String |
version
|
| Constructor Summary | |
BaseHttpRequest()
|
|
| Method Summary | |
void |
addHeader(java.lang.String name,
java.lang.String val)
Receives a new header from the parser. |
void |
changePath(java.lang.String to)
Override the current path. |
juju.reattore.io.ByteSource |
getBody()
Gets the message body as a stream. |
java.lang.String |
getHeader(java.lang.String key)
Gets a header line. |
java.util.Set |
getHeaders()
Gets all headers as a set of Map.Entry items. |
java.lang.String |
getMethod()
Gets the request method, such as GET, POST, or PUT. |
int |
getNumHeaders()
Gets the number of parsed headers not including the start line. |
java.lang.String |
getOriginalPath()
Gets the original request path, such as /dir/file.html. |
java.lang.String |
getPath()
Gets the request path, such as /dir/file.html. |
java.lang.String |
getQueryString()
Gets the request query string, such as name=val&name=val |
java.lang.String |
getVersion()
Gets the request HTTP version, such as HTTP/1.1 |
void |
setBody(juju.reattore.io.ByteSource body)
Sets the body attached to this request. |
void |
setStartLine(java.lang.String method,
java.lang.String path,
java.lang.String query,
java.lang.String version)
Bulk populate this request with the given values. |
private java.lang.String |
toLowerCase(java.lang.String key)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
headers
private java.util.Map headers
method
private java.lang.String method
path
private java.lang.String path
query
private java.lang.String query
version
private java.lang.String version
originalPath
private java.lang.String originalPath
body
private juju.reattore.io.ByteSource body
TLC
private static final java.util.IdentityHashMap TLC
| Constructor Detail |
BaseHttpRequest
public BaseHttpRequest()
| Method Detail |
addHeader
public void addHeader(java.lang.String name, java.lang.String val)
- Receives a new header from the parser.
setStartLine
public void setStartLine(java.lang.String method, java.lang.String path, java.lang.String query, java.lang.String version)
- Bulk populate this request with the given values.
toLowerCase
private java.lang.String toLowerCase(java.lang.String key)
getHeader
public java.lang.String getHeader(java.lang.String key)
- Description copied from interface:
juju.reattore.protocol.http.HttpMessage - Gets a header line.
- Specified by:
getHeaderin interfacejuju.reattore.protocol.http.HttpMessage
setBody
public void setBody(juju.reattore.io.ByteSource body)
- Sets the body attached to this request.
getMethod
public java.lang.String getMethod()
- Description copied from interface:
juju.reattore.protocol.http.HttpRequest - Gets the request method, such as GET, POST, or PUT.
- Specified by:
getMethodin interfacejuju.reattore.protocol.http.HttpRequest
getPath
public java.lang.String getPath()
- Description copied from interface:
juju.reattore.protocol.http.HttpRequest - Gets the request path, such as /dir/file.html.
- Specified by:
getPathin interfacejuju.reattore.protocol.http.HttpRequest
getQueryString
public java.lang.String getQueryString()
- Description copied from interface:
juju.reattore.protocol.http.HttpRequest - Gets the request query string, such as name=val&name=val
- Specified by:
getQueryStringin interfacejuju.reattore.protocol.http.HttpRequest
getVersion
public java.lang.String getVersion()
- Description copied from interface:
juju.reattore.protocol.http.HttpRequest - Gets the request HTTP version, such as HTTP/1.1
- Specified by:
getVersionin interfacejuju.reattore.protocol.http.HttpRequest
getBody
public juju.reattore.io.ByteSource getBody()
- Description copied from interface:
juju.reattore.protocol.http.HttpMessage - Gets the message body as a stream. Will always be present,
even if it is of zero length.
- Specified by:
getBodyin interfacejuju.reattore.protocol.http.HttpMessage
getNumHeaders
public int getNumHeaders()
- Description copied from interface:
juju.reattore.protocol.http.HttpMessage - Gets the number of parsed headers not including the start
line.
- Specified by:
getNumHeadersin interfacejuju.reattore.protocol.http.HttpMessage
getOriginalPath
public java.lang.String getOriginalPath()
- Description copied from interface:
juju.reattore.protocol.http.HttpRequest - Gets the original request path, such as /dir/file.html.
- Specified by:
getOriginalPathin interfacejuju.reattore.protocol.http.HttpRequest
changePath
public void changePath(java.lang.String to)
- Description copied from interface:
juju.reattore.protocol.http.HttpRequest - Override the current path.
- Specified by:
changePathin interfacejuju.reattore.protocol.http.HttpRequest
getHeaders
public java.util.Set getHeaders()
- Description copied from interface:
juju.reattore.protocol.http.HttpMessage - Gets all headers as a set of Map.Entry items.
- Specified by:
getHeadersin interfacejuju.reattore.protocol.http.HttpMessage
|
|||||||||
| Home >> All >> juju >> reattore >> protocol >> http >> [ impl overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
juju.reattore.protocol.http.impl.BaseHttpRequest