ucar.unidata.idv
Class OneInstanceServer

java.lang.Object
  extended by ucar.unidata.util.HttpServer
      extended by ucar.unidata.idv.OneInstanceServer

public class OneInstanceServer
extends HttpServer

Used for other idv instances to connect to so we only have one running at a time.


Nested Class Summary
static class OneInstanceServer.OneInstanceRequestHandler
          Class OneInstanceRequestHandler the handler
 
Nested classes/interfaces inherited from class ucar.unidata.util.HttpServer
HttpServer.RequestHandler
 
Field Summary
static String ARG_ARGS
          http arg
 
Fields inherited from class ucar.unidata.util.HttpServer
RESPONSE_INTERNALERROR, RESPONSE_NOTFOUND, RESPONSE_OK, RESPONSE_UNAUTHORIZED, serverProperties, TYPE_GET, TYPE_POST
 
Constructor Summary
OneInstanceServer(IntegratedDataViewer idv, int port)
          ctor
 
Method Summary
protected  HttpServer.RequestHandler doMakeRequestHandler(Socket socket)
          Make the handler for this connection
protected  void handleError(String msg, Exception exc)
          Handle the error
 
Methods inherited from class ucar.unidata.util.HttpServer
getPort, getProperties, init, initServerSocket, setPort, xxxxmain
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ARG_ARGS

public static final String ARG_ARGS
http arg

See Also:
Constant Field Values
Constructor Detail

OneInstanceServer

public OneInstanceServer(IntegratedDataViewer idv,
                         int port)
ctor

Parameters:
idv - The idv
port - The port to listen on
Method Detail

handleError

protected void handleError(String msg,
                           Exception exc)
Handle the error

Overrides:
handleError in class HttpServer
Parameters:
msg - Error message_
exc - Exception

doMakeRequestHandler

protected HttpServer.RequestHandler doMakeRequestHandler(Socket socket)
                                                  throws Exception
Make the handler for this connection

Overrides:
doMakeRequestHandler in class HttpServer
Parameters:
socket - The connection
Returns:
The handler
Throws:
Exception - On badness