info.aduna.gee.publication.servlets
Class InitServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by info.aduna.gee.publication.servlets.InitServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class InitServlet
extends javax.servlet.GenericServlet

InitServlet handles the initialization of the Zpad environment.

See Also:
Serialized Form

Field Summary
protected static Properties _serverAliasToHost
          Maps alias names to main name.
static String HOSTS_PATH
           
protected static String HOSTS_PATH_KEY
           
static String JDBC_DRIVER
           
protected static String JDBC_DRIVER_KEY
           
static String JDBC_PARAMS
           
protected static String JDBC_PARAMS_KEY
           
static String JDBC_PORT
           
protected static String JDBC_PORT_KEY
           
static String JDBC_PROTOCOL
           
protected static String JDBC_PROTOCOL_KEY
           
static String REAL_CONTEXT_PATH
           
 
Constructor Summary
InitServlet()
           
 
Method Summary
protected static void _addServerAliases(String host, String aliases)
           
 void destroy()
           
static String getHost(String alias)
          Get the main host of a server alias.
static Set getNames(String host)
          Get all names of a host (including the main name).
 String getServletInfo()
           
 void init(javax.servlet.ServletConfig config)
           
static boolean isServer()
           
 void service(javax.servlet.ServletRequest req, javax.servlet.ServletResponse res)
           
 void totalRefresh()
          Destroy all previous knowledge about all hosts.
 
Methods inherited from class javax.servlet.GenericServlet
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

HOSTS_PATH_KEY

protected static final String HOSTS_PATH_KEY
See Also:
Constant Field Values

JDBC_PROTOCOL_KEY

protected static final String JDBC_PROTOCOL_KEY
See Also:
Constant Field Values

JDBC_PORT_KEY

protected static final String JDBC_PORT_KEY
See Also:
Constant Field Values

JDBC_DRIVER_KEY

protected static final String JDBC_DRIVER_KEY
See Also:
Constant Field Values

JDBC_PARAMS_KEY

protected static final String JDBC_PARAMS_KEY
See Also:
Constant Field Values

REAL_CONTEXT_PATH

public static String REAL_CONTEXT_PATH

HOSTS_PATH

public static String HOSTS_PATH

JDBC_PROTOCOL

public static String JDBC_PROTOCOL

JDBC_PORT

public static String JDBC_PORT

JDBC_DRIVER

public static String JDBC_DRIVER

JDBC_PARAMS

public static String JDBC_PARAMS

_serverAliasToHost

protected static Properties _serverAliasToHost
Maps alias names to main name.

Constructor Detail

InitServlet

public InitServlet()
Method Detail

isServer

public static boolean isServer()

getServletInfo

public String getServletInfo()
Specified by:
getServletInfo in interface javax.servlet.Servlet
Overrides:
getServletInfo in class javax.servlet.GenericServlet

init

public void init(javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

service

public void service(javax.servlet.ServletRequest req,
                    javax.servlet.ServletResponse res)
Specified by:
service in interface javax.servlet.Servlet
Specified by:
service in class javax.servlet.GenericServlet

totalRefresh

public void totalRefresh()
Destroy all previous knowledge about all hosts. Then ensure all initial loading of all hosts.


getHost

public static String getHost(String alias)
Get the main host of a server alias.


getNames

public static Set getNames(String host)
Get all names of a host (including the main name).


_addServerAliases

protected static void _addServerAliases(String host,
                                        String aliases)

destroy

public void destroy()
Specified by:
destroy in interface javax.servlet.Servlet
Overrides:
destroy in class javax.servlet.GenericServlet


Copyright © 1997-2008 Aduna. All Rights Reserved.