public final class Request
extends java.lang.Object
Constructor and Description |
---|
Request() |
Modifier and Type | Method and Description |
---|---|
void |
action(ActionCode actionCode,
java.lang.Object param) |
void |
addPathParameter(java.lang.String name,
java.lang.String value) |
MessageBytes |
contentType() |
MessageBytes |
decodedURI() |
int |
doRead(ApplicationBufferHandler handler)
Read data from the input buffer and put it into ApplicationBufferHandler.
|
java.lang.Object |
getAttribute(java.lang.String name) |
java.util.HashMap<java.lang.String,java.lang.Object> |
getAttributes() |
MessageBytes |
getAuthType() |
int |
getAvailable() |
long |
getBytesRead() |
java.lang.String |
getCharacterEncoding()
Get the character encoding used for this request.
|
java.nio.charset.Charset |
getCharset()
Get the character encoding used for this request.
|
int |
getContentLength() |
long |
getContentLengthLong() |
java.lang.String |
getContentType() |
ServerCookies |
getCookies() |
java.lang.String |
getHeader(java.lang.String name) |
InputBuffer |
getInputBuffer() |
int |
getLocalPort() |
MimeHeaders |
getMimeHeaders() |
java.lang.Object |
getNote(int pos) |
Parameters |
getParameters() |
java.lang.String |
getPathParameter(java.lang.String name) |
ReadListener |
getReadListener() |
int |
getRemotePort() |
MessageBytes |
getRemoteUser() |
boolean |
getRemoteUserNeedsAuthorization() |
RequestInfo |
getRequestProcessor() |
Response |
getResponse() |
boolean |
getSendfile() |
int |
getServerPort() |
long |
getStartTime() |
boolean |
getSupportsRelativeRedirects() |
java.util.Map<java.lang.String,java.lang.String> |
getTrailerFields() |
UDecoder |
getURLDecoder() |
boolean |
hasExpectation() |
boolean |
isFinished() |
boolean |
isProcessing() |
boolean |
isTrailerFieldsReady() |
MessageBytes |
localAddr() |
MessageBytes |
localName() |
MessageBytes |
method() |
MessageBytes |
protocol() |
MessageBytes |
queryString() |
void |
recycle() |
MessageBytes |
remoteAddr() |
MessageBytes |
remoteHost() |
MessageBytes |
requestURI() |
MessageBytes |
scheme() |
boolean |
sendAllDataReadEvent() |
MessageBytes |
serverName()
Get the "virtual host", derived from the Host: header associated with
this request.
|
void |
setAttribute(java.lang.String name,
java.lang.Object o) |
void |
setAvailable(int available) |
void |
setCharset(java.nio.charset.Charset charset) |
void |
setContentLength(long len) |
void |
setContentType(MessageBytes mb) |
void |
setContentType(java.lang.String type) |
void |
setExpectation(boolean expectation) |
protected void |
setHook(ActionHook hook) |
void |
setInputBuffer(InputBuffer inputBuffer) |
void |
setLocalPort(int port) |
void |
setNote(int pos,
java.lang.Object value)
Used to store private data.
|
void |
setReadListener(ReadListener listener) |
void |
setRemotePort(int port) |
void |
setRemoteUserNeedsAuthorization(boolean remoteUserNeedsAuthorization) |
void |
setResponse(Response response) |
void |
setSendfile(boolean sendfile) |
void |
setServerPort(int serverPort) |
void |
setStartTime(long startTime) |
java.lang.String |
toString() |
void |
updateCounters() |
public ReadListener getReadListener()
public void setReadListener(ReadListener listener)
public boolean sendAllDataReadEvent()
public MimeHeaders getMimeHeaders()
public boolean isTrailerFieldsReady()
public java.util.Map<java.lang.String,java.lang.String> getTrailerFields()
public UDecoder getURLDecoder()
public MessageBytes scheme()
public MessageBytes method()
public MessageBytes requestURI()
public MessageBytes decodedURI()
public MessageBytes queryString()
public MessageBytes protocol()
public MessageBytes serverName()
public int getServerPort()
public void setServerPort(int serverPort)
public MessageBytes remoteAddr()
public MessageBytes remoteHost()
public MessageBytes localName()
public MessageBytes localAddr()
public int getRemotePort()
public void setRemotePort(int port)
public int getLocalPort()
public void setLocalPort(int port)
public java.lang.String getCharacterEncoding()
setCharset(Charset)
or if no
call has been made to that method try to obtain if from the
content type.public java.nio.charset.Charset getCharset() throws java.io.UnsupportedEncodingException
setCharset(Charset)
or if no
call has been made to that method try to obtain if from the
content type.java.io.UnsupportedEncodingException
- If the user agent has specified an
invalid character encodingpublic void setCharset(java.nio.charset.Charset charset)
public void setContentLength(long len)
public int getContentLength()
public long getContentLengthLong()
public java.lang.String getContentType()
public void setContentType(java.lang.String type)
public MessageBytes contentType()
public void setContentType(MessageBytes mb)
public java.lang.String getHeader(java.lang.String name)
public void setExpectation(boolean expectation)
public boolean hasExpectation()
public Response getResponse()
public void setResponse(Response response)
protected void setHook(ActionHook hook)
public void action(ActionCode actionCode, java.lang.Object param)
public ServerCookies getCookies()
public Parameters getParameters()
public void addPathParameter(java.lang.String name, java.lang.String value)
public java.lang.String getPathParameter(java.lang.String name)
public void setAttribute(java.lang.String name, java.lang.Object o)
public java.util.HashMap<java.lang.String,java.lang.Object> getAttributes()
public java.lang.Object getAttribute(java.lang.String name)
public MessageBytes getRemoteUser()
public boolean getRemoteUserNeedsAuthorization()
public void setRemoteUserNeedsAuthorization(boolean remoteUserNeedsAuthorization)
public MessageBytes getAuthType()
public int getAvailable()
public void setAvailable(int available)
public boolean getSendfile()
public void setSendfile(boolean sendfile)
public boolean isFinished()
public boolean getSupportsRelativeRedirects()
public InputBuffer getInputBuffer()
public void setInputBuffer(InputBuffer inputBuffer)
public int doRead(ApplicationBufferHandler handler) throws java.io.IOException
handler
- The destination to which to copy the datajava.io.IOException
- If an I/O error occurs during the copypublic java.lang.String toString()
toString
in class java.lang.Object
public long getStartTime()
public void setStartTime(long startTime)
public final void setNote(int pos, java.lang.Object value)
pos
- Index to use to store the notevalue
- The value to store at that indexpublic final java.lang.Object getNote(int pos)
public void recycle()
public void updateCounters()
public RequestInfo getRequestProcessor()
public long getBytesRead()
public boolean isProcessing()
Copyright © 2000-2022 Apache Software Foundation. All Rights Reserved.