if (this.runlevelSet == null) this.runlevelSet = new TreeSet();
this.runlevelSet.add(event);
}
else if (isConnectionStateEvent(event)) {
// client/[subjectId]/session/[publicSessionId]/event/connectionState
ClusterManager clusterManager = requestBroker.getServerScope().getClusterManager();
if (clusterManager == null) {
log.warning("Configuration of '" + event + "' is ignored, no cluster manager available");
continue;
}
if (!clusterManager.isReady()) {
log.warning("Configuration of '" + event + "' is ignored, cluster manager is not ready");
continue;
}
int index = event.lastIndexOf("/event/");
if (index == -1) {
log.warning("Configuration of '" + event + "' is ignored, wrong syntax");
continue;
}
// strip "event/connectionState"
String name = event.substring(0, index);
ClusterNode[] nodes = clusterManager.getClusterNodes();
for (int ic=0; ic<nodes.length; ic++) {
ClusterNode node = nodes[ic];
SessionName destination = node.getSessionName();
if (destination != null && destination.matchRelativeName(name)) {
node.registerConnectionListener(this);