|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
org.hd.d.efs.servlet.GathererServlet
public class GathererServlet
Basic servlet to hold and gather noise for entropy pool(s). This actually supports more than one entropy pool if need be, each with its own name. For example, one pool might be for high-security bits such as key generation, and another for good statistical randomness but less security such as nonce generation.
Since this servlet does not implement SingleThreadModel then there will only be one instance of this servlet per JVM instance (though in a distributed WAR application running in several JVMs, there will be one instance per VM).
As this does not implement any servlet actions other than init() and destroy() it will not directly respond to external requests. Normally this servlet would be mounted somewhere innocuous in the URI space and marked for load-on-startup to act as a holder for the EntropyPool and Gatherer objects from when the Web service starts (ie ASAP) to when the whole Web service shuts down (ie to avoid losing all its carefully harvested noise).
To all this to host threads, run external processes, etc, you may need to widen permissions. To allow external Web-site access you may need to set proxy parameters for the VM and/or (carefully) open access through firewalls.
The basic configuration for the pools is from the servlet's init-param configuration information.
When the servlet is shut down, if a seed file has been set, an attempt is made to store a seed for the next startup.
| Field Summary | |
|---|---|
static java.lang.String |
DEFAULT_POOL_NAME
By default this pool exists. |
static java.lang.String |
PNAME__POOLBYTES
Top-level property (attribute) name for (strictly positive) size of pool in bytes if present. |
| Constructor Summary | |
|---|---|
GathererServlet()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Shut down, saving a seed file from each pool if possible. |
static EntropyPool |
getPool(java.lang.String poolName)
Get entropy pool by name. |
void |
init()
Capture any config info and then create the selected entropy pools. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_POOL_NAME
public static final java.lang.String PNAME__POOLBYTES
| Constructor Detail |
|---|
public GathererServlet()
| Method Detail |
|---|
public void init()
This creates them as soon as possible to allow them to accrue some real entropy as soon as possible.
init in class javax.servlet.GenericServletpublic void destroy()
destroy in interface javax.servlet.Servletdestroy in class javax.servlet.GenericServlet
public static EntropyPool getPool(java.lang.String poolName)
throws java.util.NoSuchElementException
java.lang.IllegalArgumentException - if poolName is null or if there is no pool
with the given name
java.util.NoSuchElementException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||