|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HTTPConnection
This connection represents one HTTP request and response. It can be reused over the same underlaying connection (multiple requests over the same socket).
This implementation handles HTTP request string, headers and parameters.
Field Summary | |
---|---|
static SimpleDateFormat |
HEADER_DATE_FORMAT
|
Method Summary | |
---|---|
void |
addComponentPathToContextPath()
Updates context path adding new path element to it |
void |
forward(String path)
Forwards request. |
Map<String,Object> |
getAttributes()
This method returns map of attributes. |
int |
getBufferSize()
Returns buffer size |
String |
getComponentPath()
Returns portion of request URI from context path till end or '?' whichever comes first |
String |
getComponentResourcePath()
Returns remainder of path after context path and component path is removed |
String |
getContextPath()
Returns portion of request path up to component path |
MultiStringMap |
getRequestHeaders()
Returns request headers map |
String |
getRequestMethod()
Returns request method |
MultiStringMap |
getRequestParameters()
Returns request parameters map. |
String |
getRequestPath()
This is similar to getRequestURI() but without path info (parameters) part |
String |
getRequestProtocol()
Returns request protocol |
String |
getRequestURI()
Returns raw requested uri along with path info (if supplied in GET method) |
MultiStringMap |
getResponseHeaders()
Returns response headers map |
String |
getResponseProtocol()
Returns response protocol |
Status |
getResponseStatus()
Returns response status |
boolean |
isCommited()
Returns true if headers are already send back to the client
TODO - maybe this method is not needed! |
void |
reset()
This method processes request. |
void |
setBufferSize(int size)
Sets buffer size |
void |
setComponentPath(String requestURI)
Sets request uri. |
void |
setComponentResourcePath(String resourcePath)
Sets component resource path |
void |
setResponseProtocol(String protocol)
Sets response protocol |
void |
setResponseStatus(Status status)
Sets response status |
Methods inherited from interface org.abstracthorizon.danube.connection.Connection |
---|
close, isClosed |
Methods inherited from interface org.abstracthorizon.danube.adapter.Adaptable |
---|
adapt |
Field Detail |
---|
static final SimpleDateFormat HEADER_DATE_FORMAT
Method Detail |
---|
String getRequestProtocol()
String getRequestMethod()
MultiStringMap getRequestHeaders()
MultiStringMap getRequestParameters()
List
returned with all parameter
values in it.
String getRequestURI()
String getRequestPath()
getRequestURI()
but without path info (parameters) part
String getContextPath()
void addComponentPathToContextPath()
String getComponentPath()
void setComponentPath(String requestURI)
requestURI
- String getComponentResourcePath()
void setComponentResourcePath(String resourcePath)
resourcePath
- component resource pathMultiStringMap getResponseHeaders()
Status getResponseStatus()
void setResponseStatus(Status status)
status
- response statusString getResponseProtocol()
void setResponseProtocol(String protocol)
protocol
- response protocolboolean isCommited()
true
if headers are already send back to the client
TODO - maybe this method is not needed!
true
if headers are already send back to the clientvoid reset()
Map<String,Object> getAttributes()
void forward(String path)
path
- uri for request to be forwarded to.
IOException
- if underlaying handler had IOExceptionvoid setBufferSize(int size)
size
- buffer sizeint getBufferSize()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |