nenok.net.processor
Class Starter

java.lang.Object
  extended by java.lang.Thread
      extended by nenok.net.processor.Starter
All Implemented Interfaces:
Runnable

public class Starter
extends Thread

This class launches Nenok Processor instances and registers them in a JINI lookup service.

Version:
$LastChangedRevision: 556 $
$LastChangedDate: 2008-03-26 14:21:45 +0100 (Mi, 26 Mrz 2008) $
Author:
Marc Pouly

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Starter(Uuid pid, String... urls)
          Constructor:
 
Method Summary
 String getIP()
           
 void run()
           
 boolean terminate()
          Terminates this service.
 
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
 

Constructor Detail

Starter

public Starter(Uuid pid,
               String... urls)
        throws UnknownHostException
Constructor:

Parameters:
pid - The identifier of this processor.
urls - URL of the lookup service for unicast localization.
Throws:
UnknownHostException - Exception thrown if the host name of the current machine cannot be found.
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread
See Also:
Thread.run()

terminate

public boolean terminate()
Terminates this service. This method unexports the processor service and cancels all leases. The service disappears when the leases expire.

Returns:
true, if the service has been unexported sucessfully.

getIP

public String getIP()
Returns:
The IP of the machine running the created processor instance.