muskel
Class PresenceThread

java.lang.Object
  extended by java.lang.Thread
      extended by muskel.PresenceThread
All Implemented Interfaces:
java.lang.Runnable

public class PresenceThread
extends java.lang.Thread

This is the thread run by the RMI RemoteWorker server to answer the request for presence issued by other StandardEval components.
It listens to a Multicast group and answers with the name of the machine where it is running. The asking thread can therefore manage a new worker at that machine.


Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler
 
Field Summary
static java.lang.String DISCOVERYMESSAGE
          this is the muskel discovery message (ASCII protocol: send discovery message, receive name of the machine
static java.lang.String multicastGroup
          this is the multicast group of the muskel package discovery service
static int multicastPort
          this is the port of the muskel discovery service
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
PresenceThread()
           
 
Method Summary
 void run()
          the actual thread body: runs forever.
 
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

multicastGroup

public static final java.lang.String multicastGroup
this is the multicast group of the muskel package discovery service

See Also:
Constant Field Values

multicastPort

public static final int multicastPort
this is the port of the muskel discovery service

See Also:
Constant Field Values

DISCOVERYMESSAGE

public static final java.lang.String DISCOVERYMESSAGE
this is the muskel discovery message (ASCII protocol: send discovery message, receive name of the machine

See Also:
Constant Field Values
Constructor Detail

PresenceThread

public PresenceThread()
Method Detail

run

public void run()
the actual thread body: runs forever. Waits for a discovery message. Answers with a message hosting the host name where this server is being run

Specified by:
run in interface java.lang.Runnable
Overrides:
run in class java.lang.Thread