kom.gateway
Class KOM

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--kom.gateway.KOM

public class KOM
extends javax.servlet.http.HttpServlet

KOM 2000 Server implemented as a servlet.

See Also:
Serialized Form

Field Summary
protected  AccessControl access
           
protected  ServerConfig config
          KOM configuration data
protected  Gateway gateway
           
protected  UniqueId id
           
(package private)  javax.servlet.ServletConfig servletConfig
          Servlet configuration object
 
Fields inherited from class javax.servlet.GenericServlet
config
 
Constructor Summary
KOM()
           
 
Method Summary
 void destroy()
          The destroy method Destroys the servlet, cleaning up whatever resources are being held, and logs the destruction in the servlet log file.
protected  void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles a GET request
protected  void doPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Handles a POST request
 void init(javax.servlet.ServletConfig servletConfig)
          The init method.
private  void servletPathSetup(javax.servlet.http.HttpServletRequest request)
          Determines servlet path from HTTP request.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPut, doTrace, getAllDeclaredMethods, getLastModified, maybeSetLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, log
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

config

protected ServerConfig config
KOM configuration data

servletConfig

javax.servlet.ServletConfig servletConfig
Servlet configuration object

access

protected AccessControl access

id

protected UniqueId id

gateway

protected Gateway gateway
Constructor Detail

KOM

public KOM()
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException,
                 javax.servlet.UnavailableException
The init method. Reads the configuration file.
Overrides:
init in class javax.servlet.GenericServlet
Parameters:
ServletConfig - instance relevant to this servlet.
Throws:
javax.servlet.ServletException -  
javax.servlet.UnavailableException -  

destroy

public void destroy()
The destroy method Destroys the servlet, cleaning up whatever resources are being held, and logs the destruction in the servlet log file. This method is called, once, automatically, by the network service each time it removes the servlet. After destroy is run, it cannot be called again until the network service reloads the servlet.

When the network service removes a servlet, it calls destroy after all service calls have been completed, or a service-specific number of seconds have passed, whichever comes first. In the case of long-running operations, there could be other threads running service requests when destroy is called. The servlet writer is responsible for making sure that any threads still in the service method complete.

Overrides:
destroy in class javax.servlet.GenericServlet

doGet

protected void doGet(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response)
              throws javax.servlet.ServletException,
                     java.io.IOException
Handles a GET request
Overrides:
doGet in class javax.servlet.http.HttpServlet
Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
javax.servlet.ServletException -  
java.io.IOException -  

doPost

protected void doPost(javax.servlet.http.HttpServletRequest request,
                      javax.servlet.http.HttpServletResponse response)
               throws javax.servlet.ServletException,
                      java.io.IOException
Handles a POST request
Overrides:
doPost in class javax.servlet.http.HttpServlet
Parameters:
request - HttpServletRequest
response - HttpServletResponse
Throws:
javax.servlet.ServletException -  
java.io.IOException -  

servletPathSetup

private void servletPathSetup(javax.servlet.http.HttpServletRequest request)
Determines servlet path from HTTP request. Sets config.servletBase, config.fullServletBase, and, if not defined, config.IconBase (base url for icons).
Parameters:
request - HttpServletRequest