org.almendra.janet.cas.node
Class NodeAccessor
java.lang.Object
org.almendra.janet.cas.node.NodeAccessor
public class NodeAccessor
- extends java.lang.Object
- Author:
- Oliver Plohmann
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
node
protected Node node
NodeAccessor
protected NodeAccessor()
NodeAccessor
public NodeAccessor(Node node)
registerApplication
public ApplicationAccessor registerApplication(Application app)
throws java.lang.IllegalArgumentException,
java.rmi.RemoteException,
AlreadyRegisteredException
- Throws:
java.lang.IllegalArgumentException
java.rmi.RemoteException
AlreadyRegisteredException
registerApplication
public ApplicationAccessor registerApplication(Application app,
java.util.List nodeNames)
throws AlreadyRegisteredException,
java.lang.IllegalArgumentException,
java.rmi.RemoteException
- Register the application in the node's application registry, create all
agents, and start their schedulers. Send a notifications to all nodes in
the cluster that a new application has been registered at this node.
- Parameters:
app
- nodeNames
- names of all nodes where to register, all foreign nodes if
null.
- Returns:
- @throws
AlreadyRegisteredException
- Throws:
java.lang.IllegalArgumentException
AlreadyRegisteredException
java.rmi.RemoteException
getBillboard
public BillboardPanelController getBillboard()
getFreeTextArea
public TextAreaPanelController getFreeTextArea()
deregisterApplication
public void deregisterApplication(java.lang.String name)
throws java.util.NoSuchElementException
- Parameters:
name
-
- Throws:
java.util.NoSuchElementException
getAgentDispatcher
public IAgentDispatcher getAgentDispatcher()
getAgentPath
public AgentPath getAgentPath(java.lang.String applicationName,
java.lang.String capabilityName,
java.lang.String agentName)
- Parameters:
applicationName
- capabilityName
- agentName
-
- Returns:
getApplication
public ApplicationAccessor getApplication(java.lang.String applicationName)
throws java.util.NoSuchElementException,
java.rmi.RemoteException,
InsufficientPrivilegeException
- Parameters:
applicationName
-
- Returns:
-
- Throws:
java.util.NoSuchElementException
java.rmi.RemoteException
InsufficientPrivilegeException
getClusterEventRegistry
public ILocalClusterEventRegistry getClusterEventRegistry(java.lang.String name)
throws java.util.NoSuchElementException,
java.rmi.RemoteException
- Parameters:
name
- app
-
- Returns:
-
- Throws:
java.util.NoSuchElementException
java.rmi.RemoteException
getClusterObjectSpace
public ISerializableObjectSpace getClusterObjectSpace()
throws java.util.NoSuchElementException
- Returns:
-
- Throws:
java.util.NoSuchElementException
getClusterObjectSpace
public ISerializableObjectSpace getClusterObjectSpace(java.lang.String name)
throws java.util.NoSuchElementException
- Parameters:
name
-
- Returns:
-
- Throws:
java.util.NoSuchElementException
getLogAccessor
public LoggerAccessor getLogAccessor()
- Returns:
getName
public java.lang.String getName()
- Returns:
getNodeObjectSpace
public IObjectSpace getNodeObjectSpace()
- Returns:
getRMIName
public java.lang.String getRMIName()
- Returns:
getSystemApplication
protected SystemApplication getSystemApplication()
isApplicationRegistered
public boolean isApplicationRegistered(java.lang.String applicationName)
isForeignApplicationRegistered
public boolean isForeignApplicationRegistered(java.lang.String applicationName,
java.lang.String nodeName)
isForeignCapabilityRegistered
public boolean isForeignCapabilityRegistered(CapabilityPath path)
isIdle
public boolean isIdle()
- Returns:
shutdown
public boolean shutdown()
- Shuts down the node. Strictly speaking would require very high permission and therefore
NodeAccessor should not allow the user to shut down a node. But somewhen some user must be
able to shut down node. Left to the responsibility of the Java VM owner not to call
shutdown
mistakenly.
start
public void start()
stop
public void stop()
getVetoableEventRegistry
public IVetoableEventRegistry getVetoableEventRegistry()
- Returns:
getAllNodeNames
public java.util.List getAllNodeNames()
- Returns:
hasApplication
public boolean hasApplication(java.lang.String nodeName,
java.lang.String applicationName)
- Parameters:
string
-