Methods Summary |
---|
protected abstract java.rmi.Remote | _getServer(java.lang.String serverName)
|
private synchronized void | checkLock(java.lang.String serverName)
if (null != _lockedServerNames.get(serverName)) {
throw new LockedServerException(serverName);
}
return;
|
public synchronized java.rmi.Remote | getServer(java.lang.String serverName)
Remote returnValue = _getServer(serverName);
_lockedServerNames.put(serverName, serverName);
return returnValue;
|
public synchronized java.rmi.Remote[] | getServers(java.lang.String[] serverNames)
Remote[] returnValue = new Remote[serverNames.length];
int counter;
for (counter = 0; counter < serverNames.length; counter++) {
try {
checkLock(serverNames[counter]);
Remote nextServer = getServer(serverNames[counter]);
returnValue[counter] = nextServer;
} catch (LockedServerException serverLocked) {
int returnCounter;
for (returnCounter = 0; returnCounter < counter; returnCounter++) {
serverNoLongerActive(serverNames[returnCounter]);
}
throw serverLocked;
}
}
return returnValue;
|
public synchronized void | serverNoLongerActive(java.lang.String serverName)
_lockedServerNames.remove(serverName);
|