org.almendra.janet.cas.node
Class SystemApplication

java.lang.Object
  extended by org.almendra.janet.cas.node.AbstractApplication
      extended by org.almendra.janet.cas.node.SystemApplication
All Implemented Interfaces:
INamedObject, ILoggable, IObjectSpaceProvider

public class SystemApplication
extends AbstractApplication

Author:
Oliver To change the template for this generated type comment go to Window - Preferences - Java - Code Generation - Code and Comments

Field Summary
protected  RegistryLocation centralRegistryLocation
           
protected  java.util.List clusterEventRegistryDescriptors
           
protected  java.util.List clusterSpaceDescriptors
           
static java.lang.String CORE_CAPABILITY_NAME
           
protected  RegistryLocation localRegistryLocation
           
static java.lang.String NAME
           
 
Fields inherited from class org.almendra.janet.cas.node.AbstractApplication
capabilities, eventRegistry, exportedEvents, LOG_EVENT_REGISTERED_AGENT, logger, name, node, numOfSchedulers, objectSpace, started
 
Constructor Summary
protected SystemApplication()
           
  SystemApplication(Logger logger, Node node)
           
 
Method Summary
 SystemAgent createAgent(Node node, Logger logger)
           
 java.util.List existingCapabilitiesOnOtherNodes(java.util.List localCapabilityPaths, java.util.List excludingNodeNames)
           
 java.lang.String getAgentNameShortestQueue(java.util.List agentPaths)
           
 java.util.List getAllApplicationCapabilitesOn(java.lang.String nodeName)
           
 MultiAgentProxy getAllForeignSystemAgents()
           
 MultiAgentProxy getAllForeignSystemAgentsWithCentral()
           
protected  java.util.List getAllNodeNames(java.lang.String workstationName)
           
 MultiAgentProxy getAllSystemAgents()
           
 MultiAgentProxy getAllSystemAgentsOnNodes(java.util.List nodeNames)
           
 IAgentProxy getCentralAgent()
           
 RegistryLocation getCentralRegistryLocation()
           
 java.util.List getClusterEventRegistryDescriptors()
           
 java.util.List getClusterSpaceDescriptors()
           
 Capability getCoreCapability()
           
 MultiAgentProxy getForeignSystemAgents(java.util.List nodeNamesOrNull)
           
 RegistryLocation getLocalRegistryLocation()
           
protected  java.lang.String getNameDescriptor()
           
 java.util.List getNonCoreAgents()
           
 java.util.List getNonCoreCapabilities()
           
 int getNumberOfSchedulers()
           
 IAgentProxy getSystemAgent()
           
 IAgentProxy getSystemAgent(java.lang.String foreignNodeName)
           
 AgentPath getSystemAgentPath()
           
 IAgentProxy getSystemAgents(java.lang.String applicationName)
           
 IAgentProxy getSystemAgentsOnWorkstation(java.lang.String workstationName)
           
 boolean hasApplication(java.lang.String nodeName, java.lang.String applicationName)
           
 boolean hasNonCoreCapabilities()
           
 boolean isSystemApplication()
           
protected  void propagateRegistered(java.util.List nodeNamesOrNull)
           
protected  void registerNonCoreCapabilities(java.util.List nodeNamesOrNull)
           
 void setCentralRegistryLocation(RegistryLocation registryLocation)
           
 void setClusterEventRegistryDescriptors(java.util.List clusterEventRegistryDescriptors)
           
 void setClusterSpaceDescriptors(java.util.List clusterSpaceDescriptors)
           
 void setLocalRegistryLocation(RegistryLocation localRegistryLocation)
           
protected  void startNonCoreAgents()
           
 
Methods inherited from class org.almendra.janet.cas.node.AbstractApplication
addCapabilities, addCapability, addExportedEventDescriptors, checkValidity, getAccessor, getAgent, getAgent, getAgentCount, getAgentDispatcher, getAgentDispatcher, getAgentPaths, getAgentPaths, getAllAgentPaths, getAllAgentPaths, getAllAgentPaths, getAllAgents, getAllAgentsWithCapability, getAllCrossAgentPaths, getAllCrossAgents, getAllCrossAgents, getAllForeignAgentPaths, getAllForeignAgents, getAllForeignNodeNames, getAllForeignNodeNamesWithCentral, getAllLocalAgentNames, getAllNodeNames, getAllNodeNamesWithCapability, getAllQualifiedAgentNames, getCapabilities, getCapability, getCrossAgent, getEventRegistry, getExportedEvents, getForeignNodeNames, getLocalAgent, getLocalAgentPath, getLogger, getMonitorMask, getMonitorMaskDefaultValues, getName, getNode, getNodeEventRegistryEnvelope, getNodeLabel, getNodeName, getNodeNames, getNodeObjectSpace, getObjectSpace, getSystemAgentPath, hasAgent, hasAgent, hasCapabilities, hasCapability, hasCapability, hasForeignAgents, isStarted, primRegisterEvents, primStart, primStartInitialCommands, primStop, registeredLogEvents, setAndInitLogger, setName, setNode, setStarted, start, stop, toForeignDescriptor, toTreeDescriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NAME

public static final java.lang.String NAME
See Also:
Constant Field Values

CORE_CAPABILITY_NAME

public static final java.lang.String CORE_CAPABILITY_NAME
See Also:
Constant Field Values

centralRegistryLocation

protected RegistryLocation centralRegistryLocation

localRegistryLocation

protected RegistryLocation localRegistryLocation

clusterSpaceDescriptors

protected java.util.List clusterSpaceDescriptors

clusterEventRegistryDescriptors

protected java.util.List clusterEventRegistryDescriptors
Constructor Detail

SystemApplication

protected SystemApplication()

SystemApplication

public SystemApplication(Logger logger,
                         Node node)
Parameters:
logger -
node -
name -
Method Detail

getCoreCapability

public Capability getCoreCapability()
Returns:

getCentralRegistryLocation

public RegistryLocation getCentralRegistryLocation()
Returns:
Returns the centralRegistryLocation.

setCentralRegistryLocation

public void setCentralRegistryLocation(RegistryLocation registryLocation)
Parameters:
centralRegistryLocation - The centralRegistryLocation to set.

getSystemAgent

public IAgentProxy getSystemAgent(java.lang.String foreignNodeName)
                           throws NoSuchAgentException,
                                  IllegalAgentAccessException
Parameters:
foreignNodeName -
Throws:
NoSuchAgentException
IllegalAgentAccessException

getSystemAgentsOnWorkstation

public IAgentProxy getSystemAgentsOnWorkstation(java.lang.String workstationName)
                                         throws NoSuchAgentException,
                                                IllegalAgentAccessException
Parameters:
foreignNodeName -
Throws:
NoSuchAgentException
IllegalAgentAccessException

getAllNodeNames

protected java.util.List getAllNodeNames(java.lang.String workstationName)

getSystemAgent

public IAgentProxy getSystemAgent()
                           throws NoSuchAgentException,
                                  IllegalAgentAccessException
Parameters:
foreignNodeName -
Throws:
NoSuchAgentException
IllegalAgentAccessException

getSystemAgentPath

public AgentPath getSystemAgentPath()

getLocalRegistryLocation

public RegistryLocation getLocalRegistryLocation()
Returns:
Returns the localRegistryLocation.

setLocalRegistryLocation

public void setLocalRegistryLocation(RegistryLocation localRegistryLocation)
Parameters:
localRegistryLocation - The localRegistryLocation to set.

getAllForeignSystemAgents

public MultiAgentProxy getAllForeignSystemAgents()
                                          throws NoSuchAgentException,
                                                 IllegalAgentAccessException
Returns:
Throws:
NoSuchAgentException
IllegalAgentAccessException

getAllForeignSystemAgentsWithCentral

public MultiAgentProxy getAllForeignSystemAgentsWithCentral()
                                                     throws NoSuchAgentException,
                                                            IllegalAgentAccessException
Returns:
Throws:
NoSuchAgentException
IllegalAgentAccessException

getAllSystemAgentsOnNodes

public MultiAgentProxy getAllSystemAgentsOnNodes(java.util.List nodeNames)
                                          throws NoSuchAgentException,
                                                 IllegalAgentAccessException
Throws:
NoSuchAgentException
IllegalAgentAccessException

getAllSystemAgents

public MultiAgentProxy getAllSystemAgents()
                                   throws NoSuchAgentException,
                                          IllegalAgentAccessException
Throws:
NoSuchAgentException
IllegalAgentAccessException

getCentralAgent

public IAgentProxy getCentralAgent()

getNameDescriptor

protected java.lang.String getNameDescriptor()
Overrides:
getNameDescriptor in class AbstractApplication

getClusterSpaceDescriptors

public java.util.List getClusterSpaceDescriptors()
Returns:

setClusterSpaceDescriptors

public void setClusterSpaceDescriptors(java.util.List clusterSpaceDescriptors)
Parameters:
clusterSpaceDescriptors - The clusterSpaceDescriptors to set.

setClusterEventRegistryDescriptors

public void setClusterEventRegistryDescriptors(java.util.List clusterEventRegistryDescriptors)
Parameters:
list -

getClusterEventRegistryDescriptors

public java.util.List getClusterEventRegistryDescriptors()
Returns:
Returns the clusterEventRegistryDescriptors.

getSystemAgents

public IAgentProxy getSystemAgents(java.lang.String applicationName)

createAgent

public SystemAgent createAgent(Node node,
                               Logger logger)
Parameters:
node -
logger -
Returns:

getForeignSystemAgents

public MultiAgentProxy getForeignSystemAgents(java.util.List nodeNamesOrNull)

getNonCoreCapabilities

public java.util.List getNonCoreCapabilities()
Returns:

hasNonCoreCapabilities

public boolean hasNonCoreCapabilities()
Returns:

propagateRegistered

protected void propagateRegistered(java.util.List nodeNamesOrNull)
                            throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException

registerNonCoreCapabilities

protected void registerNonCoreCapabilities(java.util.List nodeNamesOrNull)
                                    throws java.rmi.RemoteException
Parameters:
nodeNamesOrNull -
Throws:
java.rmi.RemoteException

startNonCoreAgents

protected void startNonCoreAgents()

getNonCoreAgents

public java.util.List getNonCoreAgents()

getNumberOfSchedulers

public int getNumberOfSchedulers()
Overrides:
getNumberOfSchedulers in class AbstractApplication
Returns:

isSystemApplication

public boolean isSystemApplication()
Overrides:
isSystemApplication in class AbstractApplication
Returns:

getAgentNameShortestQueue

public java.lang.String getAgentNameShortestQueue(java.util.List agentPaths)
Parameters:
agentPaths -
Returns:

getAllApplicationCapabilitesOn

public java.util.List getAllApplicationCapabilitesOn(java.lang.String nodeName)
Parameters:
nodeName -
Returns:

existingCapabilitiesOnOtherNodes

public java.util.List existingCapabilitiesOnOtherNodes(java.util.List localCapabilityPaths,
                                                       java.util.List excludingNodeNames)
Parameters:
localCapabilityPaths -
nodeNames -
Returns:

hasApplication

public boolean hasApplication(java.lang.String nodeName,
                              java.lang.String applicationName)
Parameters:
nodeName -
applicationName -
Returns: