sharpster.daemon.externalcommunication
Class DaemonThread

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--sharpster.daemon.externalcommunication.DaemonThread
All Implemented Interfaces:
java.lang.Runnable

public class DaemonThread
extends java.lang.Thread


Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
DaemonThread(sharpster.common.Mutex ec_mutex, sharpster.common.Mutex globalMutex)
           
 
Method Summary
 void createPipeAdvertisement()
           
 boolean initialize(net.jxta.discovery.DiscoveryService disco, net.jxta.pipe.PipeService pipes, net.jxta.peergroup.PeerGroup peerGroup, sharpster.daemon.commandmanagement.ExternalCommandManager cm)
           
 void publishPipeAdvertisement()
           
 void run()
          Runs the thread, when this method returns, the thread dies.
 void shutdown()
          Notifies the thread to stop Sets shtudownRequested and starts to wait for the thread with join()
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, 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

DaemonThread

public DaemonThread(sharpster.common.Mutex ec_mutex,
                    sharpster.common.Mutex globalMutex)
Method Detail

initialize

public boolean initialize(net.jxta.discovery.DiscoveryService disco,
                          net.jxta.pipe.PipeService pipes,
                          net.jxta.peergroup.PeerGroup peerGroup,
                          sharpster.daemon.commandmanagement.ExternalCommandManager cm)

createPipeAdvertisement

public void createPipeAdvertisement()

publishPipeAdvertisement

public void publishPipeAdvertisement()

run

public void run()
Runs the thread, when this method returns, the thread dies.

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

shutdown

public void shutdown()
Notifies the thread to stop Sets shtudownRequested and starts to wait for the thread with join()