iCMS.pollerd
Class PollerdServer

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

public class PollerdServer
extends Server

PollerdServer Class

implements a server for the poller Deamon. It can be accessed using textual commands. The following commands are supported.

  • AVAIL - provides a list of all monitored items
  • STATUS [item] - returns the status of an item or of ALL
  • SUB [item] - subscribe to status changes in this item
  • UNSUB [item] - unsubscribe to status changes in this item
  • LIST - returns a list of all items suvbscribed to
  • DESCR [item] - returns a description of this item
  • INFO [item] - returns a list of available information tokens
  • PROBE [item]/[token] - returns info probe value
  • ACTION [item] - returns a list of available actions tokens (START|STOP) item can be ALL
  • STOP [item] - Stops the item
  • START [item] - Starts the item

    Revision Changes :

    Version:
    2.0.0
    Author:
    Chris Lukassen
     

    Nested Class Summary
     
    Nested classes/interfaces inherited from class java.lang.Thread
    Thread.State, Thread.UncaughtExceptionHandler
     
    Field Summary
    static int NOK
               
    static int OK
              constants
     
    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
    PollerdServer(boolean log, int logLevel, PropertyManager props, boolean quiet, MonitoredItemManager monitoredItemManager, boolean includeSyslog)
               
     
    Method Summary
    protected  Handler makeNewHandler(Hashtable userData, BufferedReader in, PrintWriter out, PropertyManager propsMan, String caller)
               
     void myEventOccurred(MyEvent evt)
               
     void removeHandler(PollerdHandler handler)
               
     
    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

    OK

    public static final int OK
    constants

    See Also:
    Constant Field Values

    NOK

    public static final int NOK
    See Also:
    Constant Field Values
    Constructor Detail

    PollerdServer

    public PollerdServer(boolean log,
                         int logLevel,
                         PropertyManager props,
                         boolean quiet,
                         MonitoredItemManager monitoredItemManager,
                         boolean includeSyslog)
    Method Detail

    makeNewHandler

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

    myEventOccurred

    public void myEventOccurred(MyEvent evt)
    Specified by:
    myEventOccurred in interface MyEventListener
    Overrides:
    myEventOccurred in class Server

    removeHandler

    public void removeHandler(PollerdHandler handler)