iCMS.trapd
Class TrapdServer

java.lang.Object
  extended by java.lang.Thread
      extended by luky.serverSimple.Server
          extended by iCMS.trapd.TrapdServer
All Implemented Interfaces:
Runnable, EventListener, MyEventListener

public class TrapdServer
extends Server

This is the server for trap events Revision Changes :

Version:
3.0.5
Author:
Chris Lukassen
 

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
protected  Vector myHandlers
           
 PersistentFixedSizeStringStorage persistentTrapHistory
           
 FixedSizeStringStorage trapHistory
           
 
Fields inherited from class luky.serverSimple.Server
listenerList, propsMan, userData, version
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
TrapdServer(boolean log, int logLevel, boolean quiet, String version, PropertyManager props, boolean includeSyslog, boolean usePersistantStorage)
          added for the convieniance of overloading the constructor
TrapdServer(boolean log, int logLevel, PropertyManager props, boolean quiet, boolean includeSyslog, boolean usePersistantStorage)
           
 
Method Summary
 Vector getTrapHistory()
          returns the last 100 (defineable) traps received by the server
protected  Handler makeNewHandler(Hashtable userData, BufferedReader in, PrintWriter out, PropertyManager propsMan, String caller)
           
 void myEventOccurred(MyEvent evt)
          passes the events to all connected clients
 void removeHandler(TrapdHandler handler)
           
 int trapOccured(String myTrap)
          passes the trap event to all connected clients
 int trapOccured(TrapEvent trap)
          process the trap internally
 
Methods inherited from class luky.serverSimple.Server
addMyEventListener, childEventOccurred, fireMyEvent, getPropsMan, print, println, removeHandler, removeMyEventListener, run, setQuit, userInit
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, 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, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myHandlers

protected Vector myHandlers

trapHistory

public FixedSizeStringStorage trapHistory

persistentTrapHistory

public PersistentFixedSizeStringStorage persistentTrapHistory
Constructor Detail

TrapdServer

public TrapdServer(boolean log,
                   int logLevel,
                   PropertyManager props,
                   boolean quiet,
                   boolean includeSyslog,
                   boolean usePersistantStorage)

TrapdServer

public TrapdServer(boolean log,
                   int logLevel,
                   boolean quiet,
                   String version,
                   PropertyManager props,
                   boolean includeSyslog,
                   boolean usePersistantStorage)
added for the convieniance of overloading the constructor

Method Detail

getTrapHistory

public Vector getTrapHistory()
returns the last 100 (defineable) traps received by the server


trapOccured

public int trapOccured(TrapEvent trap)
process the trap internally


myEventOccurred

public void myEventOccurred(MyEvent evt)
passes the events to all connected clients

Specified by:
myEventOccurred in interface MyEventListener
Overrides:
myEventOccurred in class Server

trapOccured

public int trapOccured(String myTrap)
passes the trap event to all connected clients


makeNewHandler

protected Handler makeNewHandler(Hashtable userData,
                                 BufferedReader in,
                                 PrintWriter out,
                                 PropertyManager propsMan,
                                 String caller)
Overrides:
makeNewHandler in class Server

removeHandler

public void removeHandler(TrapdHandler handler)