org.almendra.janet.cas.node
Class AbstractNodeImage

java.lang.Object
  extended by org.almendra.janet.cas.node.AbstractNodeImage
Direct Known Subclasses:
CentralNodeImage, NodeImage

public abstract class AbstractNodeImage
extends java.lang.Object

Author:
Oliver

Field Summary
protected  IAgentDispatcher agentDispatcher
           
protected  java.util.Map applications
           
protected  boolean isForeign
           
protected  NodeLocation nodeLocation
           
 
Constructor Summary
AbstractNodeImage()
           
AbstractNodeImage(IAgentDispatcher agentDispatcher, NodeLocation nodeLocation)
           
AbstractNodeImage(IAgentDispatcher agentDispatcher, NodeLocation nodeLocation, boolean isForeign)
           
 
Method Summary
 void deregisterAllApplications()
           
 void deregisterApplicationAgents(java.lang.String applicationName)
           
 AgentPath deregisterForeignApplication(AgentPath path)
           
 void deregisterForeignApplication(java.lang.String applicationName)
           
 int getAgentCount(java.lang.String applicationName, java.lang.String capabilityName)
           
 IAgentDispatcher getAgentDispatcher()
           
 java.util.List getAgentNames(java.lang.String applicationName, java.lang.String capabilityName)
           
 java.util.List getAllApplicationCapabilityPaths()
           
 java.util.Map getApplications()
           
 NodeLocation getNodeLocation()
           
 java.lang.String getNodeName()
           
 RegistryLocation getNodeRegistryLocation()
           
 boolean hasAgent(LocalAgentPath localAgentPath)
           
 boolean hasAgent(java.lang.String applicationName, java.lang.String capabilityName, java.lang.String agentName)
           
 boolean hasApplication(java.lang.String applicationName)
           
 boolean hasCapability(java.lang.String applicationName, java.lang.String capabilityName)
           
 boolean hasForeignAgent(java.lang.String applicationName, java.lang.String capabilityName, java.lang.String agentName)
           
protected  java.util.Map initApplications()
           
 boolean isForeign()
           
 boolean isForeignApplicationRegistered(java.lang.String applicationName)
           
 boolean isForeignCapabilityRegistered(java.lang.String applicationName, java.lang.String capabilityName)
           
 void registerApplicationAgents(java.util.List newAgentPaths)
           
 void registerForeignApplicationAgent(AgentPath path)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

agentDispatcher

protected IAgentDispatcher agentDispatcher

applications

protected java.util.Map applications

nodeLocation

protected NodeLocation nodeLocation

isForeign

protected boolean isForeign
Constructor Detail

AbstractNodeImage

public AbstractNodeImage()

AbstractNodeImage

public AbstractNodeImage(IAgentDispatcher agentDispatcher,
                         NodeLocation nodeLocation)

AbstractNodeImage

public AbstractNodeImage(IAgentDispatcher agentDispatcher,
                         NodeLocation nodeLocation,
                         boolean isForeign)
Method Detail

initApplications

protected java.util.Map initApplications()

getAgentDispatcher

public IAgentDispatcher getAgentDispatcher()
Returns:
Returns the agentDispatcher.

getNodeName

public java.lang.String getNodeName()
Returns:
Returns the nodeName.

registerForeignApplicationAgent

public void registerForeignApplicationAgent(AgentPath path)
Parameters:
path -

getApplications

public java.util.Map getApplications()
Returns:
Returns the applications.

getNodeRegistryLocation

public RegistryLocation getNodeRegistryLocation()
Returns:
Returns the nodeRegistryLocation.

getNodeLocation

public NodeLocation getNodeLocation()
Returns:
Returns the nodeLocation.

deregisterForeignApplication

public AgentPath deregisterForeignApplication(AgentPath path)
Parameters:
path -

deregisterAllApplications

public void deregisterAllApplications()

deregisterForeignApplication

public void deregisterForeignApplication(java.lang.String applicationName)
Parameters:
applicationName -

isForeignApplicationRegistered

public boolean isForeignApplicationRegistered(java.lang.String applicationName)
Parameters:
applicationName -
Returns:

hasForeignAgent

public boolean hasForeignAgent(java.lang.String applicationName,
                               java.lang.String capabilityName,
                               java.lang.String agentName)
Parameters:
applicationName -
capabilityName -
agentName -
Returns:

hasAgent

public boolean hasAgent(java.lang.String applicationName,
                        java.lang.String capabilityName,
                        java.lang.String agentName)
Parameters:
applicationName -
capabilityName -
agentName -
Returns:

hasCapability

public boolean hasCapability(java.lang.String applicationName,
                             java.lang.String capabilityName)

isForeignCapabilityRegistered

public boolean isForeignCapabilityRegistered(java.lang.String applicationName,
                                             java.lang.String capabilityName)
Parameters:
capabilityName -
applicationName -
Returns:

isForeign

public boolean isForeign()
Returns:
Returns the isForeign.

hasApplication

public boolean hasApplication(java.lang.String applicationName)

registerApplicationAgents

public void registerApplicationAgents(java.util.List newAgentPaths)
Parameters:
list -

deregisterApplicationAgents

public void deregisterApplicationAgents(java.lang.String applicationName)
Parameters:
applicationName -

getAgentCount

public int getAgentCount(java.lang.String applicationName,
                         java.lang.String capabilityName)

hasAgent

public boolean hasAgent(LocalAgentPath localAgentPath)
Parameters:
localAgentPath -
Returns:

getAgentNames

public java.util.List getAgentNames(java.lang.String applicationName,
                                    java.lang.String capabilityName)
Parameters:
string -
string2 -
Returns:

getAllApplicationCapabilityPaths

public java.util.List getAllApplicationCapabilityPaths()
Returns: