|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.xtreemos.system.eventmachine.stage.AbstractStage
eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
eu.xtreemos.system.eventmachine.stage.Abstract2wayStage
eu.xtreemos.xosd.daemon.Daemon
public class Daemon
Field Summary | |
---|---|
private java.util.ArrayList<CommunicationAddress> |
list
|
private static org.apache.log4j.Logger |
logger
|
protected java.util.ArrayList<eu.xtreemos.system.eventmachine.stage.AbstractStage> |
runningStages
The list of stages currently running. |
protected java.util.Hashtable<java.lang.String,java.util.ArrayList<CommunicationAddress>> |
serviceDir
Stage directory containing the list of addresses for each service known to be running at those addresses. |
Fields inherited from class eu.xtreemos.system.eventmachine.stage.Abstract2wayStage |
---|
context, counter, curContext, sink |
Fields inherited from class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage |
---|
queue |
Fields inherited from class eu.xtreemos.system.eventmachine.stage.AbstractStage |
---|
handlerChain, handlerGroup, handlerThreads, name, running, serviceListeners |
Constructor Summary | |
---|---|
Daemon()
|
Method Summary | |
---|---|
java.lang.Integer |
finishKill(java.lang.Object param)
|
java.util.ArrayList<CommunicationAddress> |
getDaemons()
"global" method (i.e. gets invoked on the root address xosd) |
java.lang.String |
getHandledEventType()
|
java.util.ArrayList<CommunicationAddress> |
getNodesRunningService(java.lang.String serviceName)
"global" method (i.e. gets invoked on the root address xosd) Retrieve a list of nodes that run a particular service. |
java.util.ArrayList<java.lang.String> |
getServiceList()
Retrieve the list of names of the services currently running on this daemon. |
void |
handleEvent(java.lang.Object event)
|
void |
init()
|
java.lang.Integer |
kill()
|
void |
registerDaemon(CommunicationAddress address)
"global" method (i.e. gets invoked on the root address xosd) |
java.lang.Object |
registerDaemonCallback(java.lang.Object arg)
|
java.lang.Integer |
registerMyServices()
Send to the root the list of services running on this node. |
java.lang.Integer |
registerServices(CommunicationAddress address,
java.util.ArrayList<java.lang.String> activeServices)
Register the list of services running within an xosd. |
protected void |
removeRegisteredServices(CommunicationAddress address)
Purge all entries of serviceDir of the given XOSD's address. |
void |
unregisterDaemon(CommunicationAddress address)
"global" method (i.e. gets invoked on the root address xosd) Unregisters the xosd from the list of running daemons. |
Methods inherited from class eu.xtreemos.system.eventmachine.stage.Abstract2wayStage |
---|
getContext, removeContext, SendException, SendException, SendException, SendReply, SendReply, SendReply, setSink |
Methods inherited from class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage |
---|
dequeue, getSource |
Methods inherited from class eu.xtreemos.system.eventmachine.stage.AbstractStage |
---|
addHandler, addHandler, addServiceListener, getName, getShortName, getThreadCount, notifyServiceInitialised, notifyServiceStarted, notifyServiceStopped, processEvent, removeHandler, removeServiceListener, setThreadCount, start, stop |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.util.ArrayList<CommunicationAddress> list
private static final org.apache.log4j.Logger logger
protected java.util.ArrayList<eu.xtreemos.system.eventmachine.stage.AbstractStage> runningStages
protected java.util.Hashtable<java.lang.String,java.util.ArrayList<CommunicationAddress>> serviceDir
Constructor Detail |
---|
public Daemon()
Method Detail |
---|
public void unregisterDaemon(CommunicationAddress address)
address
- The address of the daemon to be unregistered.public void registerDaemon(CommunicationAddress address)
address
- public void init()
init
in interface eu.xtreemos.system.eventmachine.stage.IStage
init
in class eu.xtreemos.system.eventmachine.stage.AbstractStage
public java.lang.Object registerDaemonCallback(java.lang.Object arg)
public java.util.ArrayList<CommunicationAddress> getDaemons()
public java.util.ArrayList<java.lang.String> getServiceList()
public java.lang.Integer registerMyServices() throws java.lang.Exception
java.lang.Exception
protected void removeRegisteredServices(CommunicationAddress address)
serviceDir
of the given XOSD's address.
address
- The address of an XOSD to remove from service directory.public java.lang.Integer registerServices(CommunicationAddress address, java.util.ArrayList<java.lang.String> activeServices) throws java.lang.Exception
address
- The address of the xosd registering the services.activeServices
- The list of strings identifying the running
services.
java.lang.Exception
public java.util.ArrayList<CommunicationAddress> getNodesRunningService(java.lang.String serviceName) throws java.lang.Exception
serviceName
- The name of the service being queried of.
java.lang.Exception
public java.lang.Integer kill()
public java.lang.Integer finishKill(java.lang.Object param)
public void handleEvent(java.lang.Object event) throws java.lang.Exception
handleEvent
in interface eu.xtreemos.system.eventmachine.queue.IEventHandler
handleEvent
in class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
java.lang.Exception
public java.lang.String getHandledEventType()
getHandledEventType
in class eu.xtreemos.system.eventmachine.stage.AbstractReceivingStage
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |