SmartFrog 3.10.000

org.smartfrog.sfcore.prim
Class LivenessSender

java.lang.Object
  extended by org.smartfrog.sfcore.common.Timer
      extended by org.smartfrog.sfcore.prim.LivenessSender
All Implemented Interfaces:
java.lang.Runnable

public class LivenessSender
extends Timer

Implements sending liveness messages to a liveness targets.


Field Summary
protected static java.lang.ThreadGroup livenessGroup
          Thread group for all liveness threads.
protected  Liveness target
          Target for the liveness messages.
 
Fields inherited from class org.smartfrog.sfcore.common.Timer
name, stopped, tickDelay, timerThread, waiting
 
Constructor Summary
LivenessSender(Liveness target, long delay, java.lang.String name)
          Constructor.
 
Method Summary
protected  java.lang.Thread createThread(java.lang.Runnable run, java.lang.String nameTh)
          Override Timer behavior to make the created thread a daemon thread and part of the liveness thread group.
protected  void timerTick()
          Timer behaviour.
 
Methods inherited from class org.smartfrog.sfcore.common.Timer
createThread, doTick, getStopped, getTickDelay, getWaiting, reschedule, run, setName, setTickDelay, start, stop, timerWait
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

livenessGroup

protected static java.lang.ThreadGroup livenessGroup
Thread group for all liveness threads.


target

protected Liveness target
Target for the liveness messages.

Constructor Detail

LivenessSender

public LivenessSender(Liveness target,
                      long delay,
                      java.lang.String name)
Constructor.

Parameters:
target - target for heart beats
delay - wait between heartbeats (in millis)
name - String name
Method Detail

timerTick

protected void timerTick()
Timer behaviour. Send liveness message to target. Target should handle any exceptions in the sfPing method. They are ignored here.

Overrides:
timerTick in class Timer

createThread

protected java.lang.Thread createThread(java.lang.Runnable run,
                                        java.lang.String nameTh)
Override Timer behavior to make the created thread a daemon thread and part of the liveness thread group.

Parameters:
run - interface to run on
nameTh - String name
Returns:
Thread

SmartFrog CORE 3.10.000

(C) Copyright 1998-2006 Hewlett-Packard Development Company, LP