|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.karb.hitcryptoproxy.HitCryptoProxyServer
public class HitCryptoProxyServer
This class provides a proxy for encrypted communication between the HIT
database and its clients The proxy can be run as Windows service via
main(String[]) and Procrun or as
Linux daemon via the org.apache.commons.daemon.Daemon interface
and Jsvc
| Nested Class Summary | |
|---|---|
class |
HitCryptoProxyServer.ProxyWorker
Listens for connections to its server socket to start a new ClientWorker thread This class implements
Runnable. |
| Field Summary | |
|---|---|
static java.lang.String |
START
|
static java.lang.String |
STOP
|
| Constructor Summary | |
|---|---|
HitCryptoProxyServer()
Implementors of org.apache.commons.daemon.Daemon must provide a public constructor with no arguments so that instances can be created in an automated fashion. |
|
| Method Summary | |
|---|---|
void |
destroy()
Closes the server sockets |
void |
init(org.apache.commons.daemon.DaemonContext context)
Calls init(String[]) |
void |
init(java.lang.String[] args)
Intializes logger, random generator, configuration, the server sockets, the proxy workers and the thread pool |
boolean |
isStopped()
Returns whether HitCryptoProxyServer has been stopped, used by HitCryptoProxyServer.ProxyWorker.run() |
static void |
main(java.lang.String[] args)
This main method is called for the Windows service, while for the Linux daemon the methods of the Daemon interface are used. |
void |
start()
Starts both proxy workers |
void |
stop()
Sets isStopped and shuts down the thread pool and terminate it |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String STOP
public static final java.lang.String START
| Constructor Detail |
|---|
public HitCryptoProxyServer()
| Method Detail |
|---|
public static void main(java.lang.String[] args)
throws java.io.IOException
Daemon interface are used.
After an instance of HitCryptoProxyServer is started with
parameter "start" it runs until the serviceInstance is stopped (with
another call with parameter "stop")
args - the arguments start/stop <property-file>?
java.io.IOExceptionpublic boolean isStopped()
HitCryptoProxyServer.ProxyWorker.run()
public void destroy()
destroy in interface org.apache.commons.daemon.DaemonDaemon.destroy()
public void init(java.lang.String[] args)
throws java.lang.Exception
java.lang.Exception - Any exception preventing a successful initialization.
public void init(org.apache.commons.daemon.DaemonContext context)
throws java.lang.Exception
init(String[])
init in interface org.apache.commons.daemon.Daemonjava.lang.Exception - Any exception preventing a successful initialization.Daemon.init(DaemonContext)
public void start()
throws java.lang.Exception
start in interface org.apache.commons.daemon.Daemonjava.lang.ExceptionDaemon.start()
public void stop()
throws java.io.IOException,
java.lang.InterruptedException
stop in interface org.apache.commons.daemon.Daemonjava.io.IOException
java.lang.InterruptedExceptionDaemon.stop()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||