|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--springs.rns.RegionNameServer
The Region Name Server (RNS).
Nested Class Summary | |
(package private) class |
RegionNameServer.ContextWatcher
|
Field Summary | |
private java.util.Hashtable |
_agentLocationServers
|
private java.util.Hashtable |
_contextInformations
A table storing the addresses of contexts in the region and the contexts that track every agent created in the region. |
private RegionNameServer.ContextWatcher |
_cw
The context watcher. |
private int |
_trackingFactor
Number of contexts that should track the location of every agent. |
Constructor Summary | |
RegionNameServer()
|
Method Summary | |
java.util.Vector |
addAgent(java.lang.String agentName,
springs.context.ContextAddress ca)
|
java.util.Hashtable |
addContext(springs.context.ContextAddress ca)
|
private java.util.Vector |
allocateLocationServers()
Allocate locationServers to follow an agent. |
private void |
contextUnavailable(java.lang.String cn)
Considers that the given context is not anymore available for tracking agents. |
private void |
contextUnavailable(java.lang.String cn,
java.util.Collection unAvailableContext)
Considers that the given context is not anymore available for tracking agents. |
private void |
contextUnavailableForTracking(java.lang.String cn)
Considers that the given context is not anymore available for tracking agents. |
private java.lang.String |
getNamesRegisteredAgents()
|
springs.rns.SearchingInformation |
getSearchingInformation(java.lang.String agentName,
springs.context.ContextAddress ca)
|
protected void |
initialize()
Initializes the server. |
private void |
newContextAvailable(springs.context.ContextAddress ca)
Considers that there is a new context available to assign the task of tracking agents. |
void |
printAgents()
|
void |
printContexts()
|
void |
printLocationServersFor(java.lang.String agentName)
|
void |
removeAgent(java.lang.String agentName,
springs.context.ContextAddress ca)
|
void |
removeContext(java.lang.String cn,
java.util.Collection ownedAgents)
|
protected abstract void |
start()
Starts the Region Name Server. |
private void |
watchContexts()
Watchs if every context in the region is alive. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Hashtable _contextInformations
private java.util.Hashtable _agentLocationServers
private transient RegionNameServer.ContextWatcher _cw
private int _trackingFactor
Constructor Detail |
public RegionNameServer()
Method Detail |
protected abstract void start() throws RNSStartingException
RNSStartingException
- if error.RNSStartingException
protected void initialize()
public java.util.Hashtable addContext(springs.context.ContextAddress ca) throws AlreadyExistingContextException
AlreadyExistingContextException
public void removeContext(java.lang.String cn, java.util.Collection ownedAgents) throws PermissionException
PermissionException
private java.lang.String getNamesRegisteredAgents()
public java.util.Vector addAgent(java.lang.String agentName, springs.context.ContextAddress ca) throws AlreadyExistingAgentException, PermissionException
AlreadyExistingAgentException
PermissionException
public void removeAgent(java.lang.String agentName, springs.context.ContextAddress ca) throws PermissionException
PermissionException
public springs.rns.SearchingInformation getSearchingInformation(java.lang.String agentName, springs.context.ContextAddress ca) throws PermissionException, AgentNotFoundException
PermissionException
AgentNotFoundException
public void printLocationServersFor(java.lang.String agentName)
public void printAgents()
public void printContexts()
private void newContextAvailable(springs.context.ContextAddress ca)
ca
- the address of the context.ContextAddress
private java.util.Vector allocateLocationServers()
Vector
private void contextUnavailable(java.lang.String cn)
cn
- the name of the context to remove. This context is not in Hashtable yet.String
private void contextUnavailable(java.lang.String cn, java.util.Collection unAvailableContext)
cn
- the name of the context to remove. This context is still in Hashtable.unAvailableContext
- a list of context which can not be pinged.String
,
String
private void contextUnavailableForTracking(java.lang.String cn)
cn
- the name of the context to remove.String
private void watchContexts()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |