All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.protocol.http.Request

java.lang.Object
   |
   +----w3c.www.http.HttpMessage
           |
           +----w3c.www.http.HttpEntityMessage
                   |
                   +----w3c.www.http.HttpRequestMessage
                           |
                           +----w3c.www.protocol.http.Request

public class Request
extends HttpRequestMessage
The client side idea of a request. Requests are created only by the HttpManager, by cloning its template request that defines the default (application wide) request settings.


Variable Index

 o allowuserinteraction
Are we allowed to interact with the user ?
 o interrupted
Has this request been interrupted ?
 o manager
The manager that created this request.
 o observer
The observer for the request, if any.
 o output
The request output stream, to PUT or POST data.
 o pipeline
Can we pipeline that request, if appropriate support is detected ?
 o server
The server currently running the request, if any.

Method Index

 o endEmit(OutputStream, int)
End of header emiting, continue by sending optional output stream.
 o getAllowUserInteraction()
Are we allowed to do some user interaction to run this request.
 o getManager()
Get this request's manager.
 o getObserver()
Get the observer for this request.
 o getOutputStream()
Get the input stream to read that request body.
 o hasOutputStream()
Does this request has an associated input stream ?
 o interruptRequest()
Interrupt that request processing.
 o isInterrupted()
Has this request been interrupted ?
 o makeReply(int)
Create a Reply instance matching this request.
 o setAllowUserInteraction(boolean)
Decide wether we are allowed to interact wit hthe user.
 o setObserver(RequestObserver)
Set the observer for this request.
 o setOutputStream(InputStream)
Set this request output stream.
 o setPipeline(boolean)
Enable/disable pipelining for that request.
 o setServer(HttpServer)
Mark that request has being run by given server.
 o unsetServer()
Mark that request as no longer attached to a server object.

Variables

 o manager
 protected HttpManager manager
The manager that created this request.

 o allowuserinteraction
 protected boolean allowuserinteraction
Are we allowed to interact with the user ?

 o output
 protected InputStream output
The request output stream, to PUT or POST data.

 o observer
 protected RequestObserver observer
The observer for the request, if any.

 o pipeline
 protected boolean pipeline
Can we pipeline that request, if appropriate support is detected ?

 o interrupted
 protected boolean interrupted
Has this request been interrupted ?

 o server
 protected HttpServer server
The server currently running the request, if any.

Methods

 o setServer
 protected synchronized void setServer(HttpServer server)
Mark that request has being run by given server.

Parameters:
server - The server in charge for that request.
 o unsetServer
 protected synchronized void unsetServer()
Mark that request as no longer attached to a server object.

 o setPipeline
 public void setPipeline(boolean onoff)
Enable/disable pipelining for that request. By default, this HTTP implementation tries it's best to use pipelining, if you take manual control over it, you're responsible for damages.

Parameters:
onoff - The pipelining toggle.
 o endEmit
 protected void endEmit(OutputStream out,
                        int what) throws IOException
End of header emiting, continue by sending optional output stream.

Parameters:
out - The output stream to write to.
Overrides:
endEmit in class HttpMessage
 o getAllowUserInteraction
 public boolean getAllowUserInteraction()
Are we allowed to do some user interaction to run this request.

Returns:
A boolean, true if user interaction is allowed false otherwise.
 o setAllowUserInteraction
 public void setAllowUserInteraction(boolean onoff)
Decide wether we are allowed to interact wit hthe user.

Parameters:
onoff - A boolean, true if interaction is allowed.
 o interruptRequest
 public synchronized void interruptRequest()
Interrupt that request processing. Do whatever it takes to interrupt that request processing, as soon as possible.

 o isInterrupted
 public boolean isInterrupted()
Has this request been interrupted ?

Returns:
A boolean.
 o getManager
 public HttpManager getManager()
Get this request's manager.

Returns:
The instance of the manager taking care of this request.
 o setOutputStream
 public void setOutputStream(InputStream in)
Set this request output stream. As a side effect, setting the body of the request will disable pipelining. If you know what you're doing, you can turn it on again by using the setPipeline method.

Parameters:
in - The data to send to the server.
 o hasOutputStream
 public boolean hasOutputStream()
Does this request has an associated input stream ?

Returns:
A boolean true of it has.
 o getOutputStream
 public InputStream getOutputStream()
Get the input stream to read that request body. Warning it is up to the caller to make sure to:

Returns:
An InputStream instance, or null if the request has no body.
 o makeReply
 public Reply makeReply(int status)
Create a Reply instance matching this request.

 o setObserver
 public void setObserver(RequestObserver observer)
Set the observer for this request.

Parameters:
observer - The observer.
 o getObserver
 public RequestObserver getObserver()
Get the observer for this request.

Returns:
An instance of RequestObserver, or null if undefined.

All Packages  Class Hierarchy  This Package  Previous  Next  Index