|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ProcessorTask
Process HTTP request.
Field Summary |
---|
Fields inherited from interface com.sun.grizzly.http.Task |
---|
ACCEPT_TASK, PROCESSOR_TASK, READ_TASK |
Method Summary | |
---|---|
int |
getBufferSize()
Return the request input buffer size |
boolean |
getDropConnection()
Is the keep-alive mechanism enabled or disabled. |
Interceptor |
getHandler()
Get the Interceptor used by this instance. |
InputStream |
getInputStream()
Get the InputStream associated with HTTP connection |
int |
getMaxPostSize()
Return the maximum size of a POST which will be buffered in SSL mode. |
String |
getRequestURI()
Return the request URI. |
Socket |
getSocket()
Return the current Socket used by this instance |
long |
getWorkerThreadID()
Return the current WorkerThread ID associated with this instance. |
void |
initialize()
Initialize the stream and the buffer used to parse the request. |
void |
invokeAdapter()
Invoke the Adapter , which usualy invoke the Servlet
Container. |
boolean |
isError()
Has an error occured duing the HTTP parsing? |
boolean |
isKeepAlive()
Return true if the connection header was keep-alive. |
void |
parseRequest()
Parse the request line and the http header. |
boolean |
parseRequest(InputStream input,
OutputStream output,
boolean keptAlive)
Parse the request line and the http header. |
void |
postProcess()
Post process the http request, after the response has been commited. |
void |
postProcess(InputStream input,
OutputStream output)
Post process the http request, after the response has been commited. |
void |
postResponse()
Prepare and post the response. |
void |
preProcess()
Pre process the request by decoding the request line and the header. |
void |
preProcess(InputStream input,
OutputStream output)
Pre process the request by decoding the request line and the header. |
boolean |
process(InputStream input,
OutputStream output)
Process pipelined HTTP requests using the specified input and output streams. |
void |
setBufferSize(int requestBufferSize)
Set the request input buffer size |
void |
setDropConnection(boolean dropConnection)
Enable or disable the keep-alive mechanism. |
void |
setHandler(Interceptor handler)
Set the Interceptor used by this instance. |
void |
setInputStream(InputStream inputStream)
Set the InputStream associated with HTTP connection |
void |
setMaxHttpHeaderSize(int maxHttpHeaderSize)
|
void |
setMaxPostSize(int mps)
Set the maximum size of a POST which will be buffered in SSL mode. |
void |
setSocket(Socket socket)
Set the socket associated with this HTTP connection. |
void |
setTimeout(int timeouts)
Set the upload timeout. |
void |
terminateProcess()
Notify the TaskListener that the request has been
fully processed. |
Methods inherited from interface com.sun.grizzly.http.Task |
---|
addTaskListener, cancelTask, clearTaskListeners, doTask, execute, getKeepAliveStats, getPipeline, getRecycle, getRequestGroupInfo, getSelectionKey, getSelectorThread, getTaskListeners, getType, isMonitoringEnabled, recycle, removeTaskListener, setPipeline, setRecycle, setSelectionKey, setSelectorThread |
Methods inherited from interface java.lang.Runnable |
---|
run |
Methods inherited from interface java.util.concurrent.Callable |
---|
call |
Method Detail |
---|
void initialize()
int getBufferSize()
boolean getDropConnection()
int getMaxPostSize()
Socket getSocket()
Socket
used by this instance
Socket
used by this instancevoid invokeAdapter()
Adapter
, which usualy invoke the Servlet
Container.
void parseRequest() throws Exception
Exception
boolean parseRequest(InputStream input, OutputStream output, boolean keptAlive) throws Exception
input
- the InputStream to read bytesoutput
- the OutputStream to write bytes
Exception
void postProcess() throws Exception
Exception
void postProcess(InputStream input, OutputStream output) throws Exception
Exception
void postResponse() throws Exception
input
- the InputStream to read bytesoutput
- the OutputStream to write bytes
Exception
void preProcess() throws Exception
Exception
void preProcess(InputStream input, OutputStream output) throws Exception
input
- the InputStream to read bytesoutput
- the OutputStream to write bytes
Exception
boolean process(InputStream input, OutputStream output) throws Exception
input
- stream from which the HTTP requests will be readoutput
- stream which will be used to output the HTTP
responses
Exception
- error during an I/O operationvoid setBufferSize(int requestBufferSize)
void setDropConnection(boolean dropConnection)
false
will automatically add the following header to the
response ' Connection: close '
void setHandler(Interceptor handler)
Interceptor
used by this instance.
Interceptor getHandler()
Interceptor
used by this instance.
void setMaxHttpHeaderSize(int maxHttpHeaderSize)
void setMaxPostSize(int mps)
void setSocket(Socket socket)
void setInputStream(InputStream inputStream)
InputStream
associated with HTTP connection
InputStream getInputStream()
InputStream
associated with HTTP connection
void setTimeout(int timeouts)
void terminateProcess()
TaskListener
that the request has been
fully processed.
String getRequestURI()
long getWorkerThreadID()
boolean isKeepAlive()
boolean isError()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |