FileDocCategorySizeDatePackage
ProcessorTask.javaAPI DocGlassfish v2 API6638Fri May 04 22:37:04 BST 2007com.sun.enterprise.web.connector.grizzly

ProcessorTask

public interface ProcessorTask implements Task
Process HTTP request.
author
Jean-Francois Arcand

Fields Summary
Constructors Summary
Methods Summary
public intgetBufferSize()
Return the request input buffer size

public booleangetDropConnection()
Is the keep-alive mechanism enabled or disabled.

public HandlergetHandler()
Get the Handler used by this instance.

public intgetMaxPostSize()
Return the maximum size of a POST which will be buffered in SSL mode.

public java.lang.StringgetRequestURI()
Return the request URI.

public java.net.SocketgetSocket()
Return the current Socket used by this instance

return
socket the current Socket used by this instance

public longgetWorkerThreadID()
Return the current WorkerThread ID associated with this instance.

public voidinitialize()
Initialize the stream and the buffer used to parse the request.

public voidinvokeAdapter()
Invoke the Adapter, which usualy invoke the Servlet Container.

public booleanisError()
Has an error occured duing the HTTP parsing?

public booleanisKeepAlive()
Return true if the connection header was keep-alive.

public voidparseRequest()
Parse the request line and the http header.

public booleanparseRequest(java.io.InputStream input, java.io.OutputStream output, boolean keptAlive)
Parse the request line and the http header.

param
input the InputStream to read bytes
param
output the OutputStream to write bytes
return
true if the parsing was successful.

public voidpostProcess(java.io.InputStream input, java.io.OutputStream output)
Post process the http request, after the response has been commited.

public voidpostProcess()
Post process the http request, after the response has been commited.

public voidpostResponse()
Prepare and post the response.

param
input the InputStream to read bytes
param
output the OutputStream to write bytes

public voidpreProcess()
Pre process the request by decoding the request line and the header.

public voidpreProcess(java.io.InputStream input, java.io.OutputStream output)
Pre process the request by decoding the request line and the header.

param
input the InputStream to read bytes
param
output the OutputStream to write bytes

public booleanprocess(java.io.InputStream input, java.io.OutputStream output)
Process pipelined HTTP requests using the specified input and output streams.

param
input stream from which the HTTP requests will be read
param
output stream which will be used to output the HTTP responses
return
true is an error occured.
throws
Exception error during an I/O operation

public voidsetBufferSize(int requestBufferSize)
Set the request input buffer size

public voidsetDropConnection(boolean dropConnection)
Enable or disable the keep-alive mechanism. Setting this value to false will automatically add the following header to the response ' Connection: close '

public voidsetHandler(Handler handler)
Set the Handler used by this instance.

public voidsetMaxHttpHeaderSize(int maxHttpHeaderSize)

public voidsetMaxPostSize(int mps)
Set the maximum size of a POST which will be buffered in SSL mode.

public voidsetSocket(java.net.Socket socket)
Set the socket associated with this HTTP connection.

public voidsetTimeout(int timeouts)
Set the upload timeout.

public voidterminateProcess()
Notify the TaskListener that the request has been fully processed.