All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.protocol.http.HttpServer

java.lang.Object
   |
   +----w3c.www.protocol.http.HttpServer

public abstract class HttpServer
extends Object
The HttpServer interface. This interface is used to control the communication between the HttpManager and the HttpServer on one side, and between the HttpServer and the HttpConnection on the other side.

The implementation of the Connection part of the interface is optional and should be provided only if your server instance uses the connection concept.


Variable Index

 o state

Constructor Index

 o HttpServer()

Method Index

 o getMajorVersion()
Get this server's major version number.
 o getMinorVersion()
Get this server's minor version number.
 o getProtocol()
Get this servers' protocol.
 o getState()
Get the manager's state for that server.
 o initialize(HttpManager, HttpServerState, String, int, int)
Initialize this server instance for the given target location.
 o interruptRequest(Request)
Interrupt the given request (that was launched by that server).
 o runRequest(Request)
HTTP manager interface - Handle this request in sync mode.
 o setTimeout(int)
Set the new timeout for this server

Variables

 o state
 protected HttpServerState state

Constructors

 o HttpServer
 public HttpServer()

Methods

 o getProtocol
 public abstract String getProtocol()
Get this servers' protocol.

Returns:
A String encoding the protocol used to dialog with the target server.
 o getState
 protected final HttpServerState getState()
Get the manager's state for that server.

Returns:
The manager state.
 o getMajorVersion
 public abstract short getMajorVersion()
Get this server's major version number.

Returns:
The server's major number version, or -1 if still unknown.
 o getMinorVersion
 public abstract short getMinorVersion()
Get this server's minor version number.

Returns:
The server's minor number version, or -1 if still unknown.
 o runRequest
 public abstract Reply runRequest(Request request) throws HttpException
HTTP manager interface - Handle this request in sync mode.

Parameters:
request - The request this server should run.
Returns:
A Reply instance, containing the target server's reply.
Throws: HttpException
If anything failed during request processing.
 o interruptRequest
 protected abstract void interruptRequest(Request request)
Interrupt the given request (that was launched by that server).

Parameters:
request - The request to interrupt.
 o setTimeout
 protected abstract void setTimeout(int timeout)
Set the new timeout for this server

Parameters:
timeout - The timeout value in milliseconds
 o initialize
 public abstract void initialize(HttpManager manager,
                                 HttpServerState state,
                                 String host,
                                 int port,
                                 int timeout) throws HttpException
Initialize this server instance for the given target location.

Parameters:
manager - The central HTTP protocol manager.
state - The manager's state for that server.
host - The target server's FQDN.
port - The target server's port number.
timeout - The timeout in millisecond for the sockets
Throws: HttpException
If host coulnd't be resolved.

All Packages  Class Hierarchy  This Package  Previous  Next  Index