org.csc.phynixx.watchdog
Class WatchdogRegistry

java.lang.Object
  extended by org.csc.phynixx.watchdog.WatchdogRegistry

public class WatchdogRegistry
extends Object

Version:
$Revision: 1.6 $
Author:
See Also:
ThreadGroup

Nested Class Summary
static interface WatchdogRegistry.IWatchdogVisitor
           
 
Field Summary
protected  org.apache.log4j.Logger log
          Logger
static String OK
           
 
Method Summary
 void activate()
          activates all Watchdogs
 void activate(Long id)
          activates all Conditions of the Watchdog with the given id
 void clearOut()
           
 IWatchdog createWatchdog(long checkInterval)
           
 void deactivate()
          restarts all Watchdogs
 void deactivate(Long id)
          deactivates all Conditions of the Watchdog with the given id
 void deregisterWatchdog(IWatchdog wd)
           
 void deregisterWatchdog(Long key)
           
 int getCountWatchdogs()
           
 WatchdogInfo[] getManagementWatchdogsInfo()
           
 String getManagementWatchdogsState()
           
static WatchdogRegistry getTheRegistry()
           
 WatchdogInfo[] getWatchdogInfos()
           
static long getWatchdogManagementInterval()
           
static long getWatchTheWatchdogInterval()
           
 void registerWatchdog(org.csc.phynixx.watchdog.Watchdog wd)
          Thread wird unter seinem Namen verwaltet (t.getName())
 IWatchdog resolveWatchdogId(Long id)
           
 void restart()
          restarts all Watchdogs
 void restart(Long id)
          restart the Watchdog with the given id
static void setWatchdogManagementInterval(long watchdogManagementInterval)
           
 String[][] showWatchdogInfos()
           
 void shutdown()
          killt alle Threads der Gruppe und wartet bis auch der letzte beendet ist.
 void shutdown(Long id)
          stops the the Watchdog with the given id The executing thread of the watchdog is stopped and the watchdog is removed from the registry.
 void stop()
          restarts all Watchdogs
 void stop(Long id)
          stops the the Watchdog with the given id The executing thread of the watchdog is stopped, but the watchdog is not removed from the registry.
 void visitWatchdogRegistry(WatchdogRegistry.IWatchdogVisitor visitor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

OK

public static final String OK
See Also:
Constant Field Values

log

protected org.apache.log4j.Logger log
Logger

Method Detail

getWatchdogManagementInterval

public static long getWatchdogManagementInterval()

setWatchdogManagementInterval

public static void setWatchdogManagementInterval(long watchdogManagementInterval)

getWatchTheWatchdogInterval

public static long getWatchTheWatchdogInterval()

getManagementWatchdogsInfo

public WatchdogInfo[] getManagementWatchdogsInfo()

getManagementWatchdogsState

public String getManagementWatchdogsState()

createWatchdog

public IWatchdog createWatchdog(long checkInterval)

getTheRegistry

public static WatchdogRegistry getTheRegistry()

registerWatchdog

public void registerWatchdog(org.csc.phynixx.watchdog.Watchdog wd)
Thread wird unter seinem Namen verwaltet (t.getName())

Parameters:
wd - Watchdog
Throws:
IllegalStateException - falls Thread NICHT zur aktuellen ThreadGroup( ==this) geh�rt;

deregisterWatchdog

public void deregisterWatchdog(Long key)

resolveWatchdogId

public IWatchdog resolveWatchdogId(Long id)

deregisterWatchdog

public void deregisterWatchdog(IWatchdog wd)

clearOut

public void clearOut()

restart

public void restart()
restarts all Watchdogs


stop

public void stop()
restarts all Watchdogs


activate

public void activate()
activates all Watchdogs


deactivate

public void deactivate()
restarts all Watchdogs


shutdown

public void shutdown()
killt alle Threads der Gruppe und wartet bis auch der letzte beendet ist. Es wird der evtl. Exceptionhandler geschlossen.


getCountWatchdogs

public int getCountWatchdogs()

getWatchdogInfos

public WatchdogInfo[] getWatchdogInfos()

showWatchdogInfos

public String[][] showWatchdogInfos()

visitWatchdogRegistry

public void visitWatchdogRegistry(WatchdogRegistry.IWatchdogVisitor visitor)

stop

public void stop(Long id)
stops the the Watchdog with the given id The executing thread of the watchdog is stopped, but the watchdog is not removed from the registry. It can be restarted

Throws:
IllegalStateException - Watchdog does not exist, check existence with findWatchdog(Long)
See Also:
restart(Long), shutdown(Long)

shutdown

public void shutdown(Long id)
stops the the Watchdog with the given id The executing thread of the watchdog is stopped and the watchdog is removed from the registry.

It can nor be restarted

Throws:
IllegalStateException - Watchdog does not exist, check existence with findWatchdog(Long)
See Also:
restart(Long), stop(Long)

restart

public void restart(Long id)
restart the Watchdog with the given id

Throws:
IllegalStateException - Watchdog does not exist, check existence with findWatchdog(Long)

deactivate

public void deactivate(Long id)
deactivates all Conditions of the Watchdog with the given id

Throws:
IllegalStateException - Watchdog does not exist, check existence with findWatchdog(Long)

activate

public void activate(Long id)
activates all Conditions of the Watchdog with the given id

Throws:
IllegalStateException - Watchdog does not exist, check existence with findWatchdog(Long)


Copyright © 2015. All rights reserved.