org.w3c.www.protocol.http
Class HttpMuxServer

java.lang.Object
  extended by org.w3c.www.protocol.http.HttpServer
      extended by org.w3c.www.protocol.http.HttpMuxServer

public class HttpMuxServer
extends HttpServer


Field Summary
protected  org.w3c.www.protocol.http.HttpMuxConnection conn
           
protected  int conn_timeout
           
protected  java.lang.String host
           
protected  HttpManager manager
           
protected  int port
           
protected  int timeout
           
 
Fields inherited from class org.w3c.www.protocol.http.HttpServer
state
 
Constructor Summary
HttpMuxServer()
           
 
Method Summary
protected  void acquireConnection()
           
 void deleteConnection(org.w3c.www.protocol.http.HttpConnection conn)
           
 short getMajorVersion()
          Get this server's major version number.
 short getMinorVersion()
          Get this server's minor version number.
 java.lang.String getProtocol()
          Get this servers' protocol.
 void initialize(HttpManager manager, org.w3c.www.protocol.http.HttpServerState state, java.lang.String host, int port, int timeout)
          Initialize this server instance for the given target location.
 void initialize(HttpManager manager, org.w3c.www.protocol.http.HttpServerState state, java.lang.String host, int port, int timeout, int conn_timeout)
          Initialize this server instance for the given target location.
protected  void interruptRequest(Request request)
          Interrupt given request (that we launched).
protected  boolean isTwoStage(Request requset)
          Is this request a two stage request.
protected  void notifyObserver(RequestObserver obs, RequestEvent evt)
           
protected  void notifyObserver(RequestObserver obs, Request request, int code)
           
protected  void releaseConnection()
           
 Reply runRequest(Request req)
          Run the given request.
 void setConnTimeout(int conn_timeout)
          Set the new connection timeout for this server
 void setTimeout(int timeout)
          Set the new timeout for this server
 
Methods inherited from class org.w3c.www.protocol.http.HttpServer
getState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

conn

protected org.w3c.www.protocol.http.HttpMuxConnection conn

manager

protected HttpManager manager

host

protected java.lang.String host

port

protected int port

timeout

protected int timeout

conn_timeout

protected int conn_timeout
Constructor Detail

HttpMuxServer

public HttpMuxServer()
Method Detail

acquireConnection

protected void acquireConnection()
                          throws java.io.IOException
Throws:
java.io.IOException

releaseConnection

protected void releaseConnection()

getProtocol

public java.lang.String getProtocol()
Description copied from class: HttpServer
Get this servers' protocol.

Specified by:
getProtocol in class HttpServer
Returns:
A String encoding the protocol used to dialog with the target server.

getMajorVersion

public short getMajorVersion()
Description copied from class: HttpServer
Get this server's major version number.

Specified by:
getMajorVersion in class HttpServer
Returns:
The server's major number version, or -1 if still unknown.

getMinorVersion

public short getMinorVersion()
Description copied from class: HttpServer
Get this server's minor version number.

Specified by:
getMinorVersion in class HttpServer
Returns:
The server's minor number version, or -1 if still unknown.

setTimeout

public void setTimeout(int timeout)
Description copied from class: HttpServer
Set the new timeout for this server

Specified by:
setTimeout in class HttpServer
Parameters:
timeout - The timeout value in milliseconds

setConnTimeout

public void setConnTimeout(int conn_timeout)
Description copied from class: HttpServer
Set the new connection timeout for this server

Specified by:
setConnTimeout in class HttpServer

isTwoStage

protected boolean isTwoStage(Request requset)
Is this request a two stage request.

Returns:
A boolean, true if the request is two stage, false otherwise.

notifyObserver

protected void notifyObserver(RequestObserver obs,
                              Request request,
                              int code)

notifyObserver

protected void notifyObserver(RequestObserver obs,
                              RequestEvent evt)

runRequest

public Reply runRequest(Request req)
                 throws HttpException
Run the given request.

Specified by:
runRequest in class HttpServer
Parameters:
request - The request to run.
Returns:
An instance of Reply, containing all the reply informations.
Throws:
HttpException - If something failed during request processing.

interruptRequest

protected void interruptRequest(Request request)
Interrupt given request (that we launched). THIS METHID IS NOT IMPLEMENTED !

Specified by:
interruptRequest in class HttpServer
Parameters:
request - The request to interrupt.

deleteConnection

public void deleteConnection(org.w3c.www.protocol.http.HttpConnection conn)

initialize

public void initialize(HttpManager manager,
                       org.w3c.www.protocol.http.HttpServerState state,
                       java.lang.String host,
                       int port,
                       int timeout)
Initialize this server instance for the given target location.

Specified by:
initialize in class HttpServer
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 socket's timeout in millisec

initialize

public void initialize(HttpManager manager,
                       org.w3c.www.protocol.http.HttpServerState state,
                       java.lang.String host,
                       int port,
                       int timeout,
                       int conn_timeout)
Initialize this server instance for the given target location.

Specified by:
initialize in class HttpServer
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 socket's timeout in millisec