public class NetworkEventServer extends Thread implements AuditEventListener
NetworkAuditEventSource to connect
and push all events to the connected event-sources.
This class is not well-tested!Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
static int |
CLIENT_POLL_TIME |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
NetworkEventServer(int port,
Authenticator auth) |
NetworkEventServer(String s,
Authenticator auth) |
NetworkEventServer(String serv,
int port,
Authenticator auth) |
| Modifier and Type | Method and Description |
|---|---|
static NetworkEventServer |
createSSLEventServer(File keyFile,
String pass,
int port,
Authenticator auth) |
static NetworkEventServer |
createSSLEventServer(InputStream keyIn,
int port,
Authenticator auth) |
static NetworkEventServer |
createSSLEventServer(InputStream keyStream,
String pass,
int port,
Authenticator auth)
This method creates a new NetworkEventServer that is based on an SSL-enabled server socket.
|
void |
eventArrived(AuditEvent e)
This method is called when a new event arrives at the listener.
|
void |
eventsArrived(Collection<AuditEvent> events)
This method is called for notifying the listener of arrival of
several events in a block.
|
void |
run() |
void |
start() |
void |
unregisterClient(NetworkClientWorkerThread t)
This method is used to unregister one of the client thread from the dispatcher.
|
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yieldpublic static final int CLIENT_POLL_TIME
public NetworkEventServer(String s, Authenticator auth) throws Exception
Exceptionpublic NetworkEventServer(String serv, int port, Authenticator auth) throws Exception
Exceptionpublic NetworkEventServer(int port,
Authenticator auth)
throws Exception
Exceptionpublic static NetworkEventServer createSSLEventServer(File keyFile, String pass, int port, Authenticator auth) throws Exception
Exceptionpublic static NetworkEventServer createSSLEventServer(InputStream keyIn, int port, Authenticator auth) throws Exception
Exceptionpublic static NetworkEventServer createSSLEventServer(InputStream keyStream, String pass, int port, Authenticator auth) throws Exception
keyStream and the pass, which
refer to the stream that is used to read the private/public key pair from. The password is used to decrypt
the private key from the keyStream.keyStream - The stream to read the public/private key pair from.pass - The password to decrypt the key information.port - The port on which this server will accept connections.auth - This map contains a set of login/password pairs used to authenticate users.Exception - In case the server socket could not be created or something went wrong with the key decryption.public void eventArrived(AuditEvent e)
AuditEventListener
After the dispatcher calls this method each listener gets a call to
#notify(), thus a listener might wait for packets to arrive.
eventArrived in interface EventListener<AuditEvent>eventArrived in interface AuditEventListenere - The event which arrived.AuditEventListener.eventArrived(org.jwall.web.audit.AuditEvent)public void eventsArrived(Collection<AuditEvent> events)
AuditEventListenerAuditEventListener.eventArrived(AuditEvent) for each of the given
events, but may be handled in a more efficient way by implementations
capable of processing blocks of events.eventsArrived in interface AuditEventListenerevents - The block of events arrived.public void unregisterClient(NetworkClientWorkerThread t)
t - The client thread to unregister.Copyright © 2014 jwall.org. All Rights Reserved.