logger.debug(COMMUNITY_PROP_NAME + "=" + initialCommunity);
logger.info("Joining community " + initialCommunity);
  protected void setupSubscriptions() {    NODE_NAME = agentId.toString();    // Get required services    logger =      (LoggingService)getBindingSite().getServiceBroker().getService(this, LoggingService.class, null);    logger = org.cougaar.core.logging.LoggingServiceWithPrefix.add(logger, agentId + ": ");    uidService =      (UIDService) getBindingSite().getServiceBroker().getService(this, UIDService.class, null);    eventService =      (EventService) getBindingSite().getServiceBroker().getService(this, EventService.class, null);    commSvc =      (CommunityService) getBindingSite().getServiceBroker().getService(this, CommunityService.class, null);    // Join Robustness Community designated by startup parameter    String initialCommunity = System.getProperty(COMMUNITY_PROP_NAME);    if (initialCommunity != null) {      logger.debug(COMMUNITY_PROP_NAME + "=" + initialCommunity);      UID joinRequestUID = uidService.nextUID();      myUIDs.add(joinRequestUID);      Attributes memberAttrs = new BasicAttributes();      Attribute roles = new BasicAttribute("Role", "Member");      roles.add(HEALTH_MONITOR_ROLE);      memberAttrs.put(roles);      memberAttrs.put("EntityType", ENTITY_TYPE);      memberAttrs.put("CanBeManager", "False");      blackboard.publishAdd(new JoinCommunity(initialCommunity,                                              NODE_NAME,                                              CommunityService.AGENT,                                              memberAttrs,                                              false,                                              null,                                              joinRequestUID));    }    // Subscribe to Node Status updates sent by peer Health Monitors via Relay    nodeStatusRelaySub =        (IncrementalSubscription)blackboard.subscribe(nodeStatusRelayPredicate);    // Subscribe to external requests    healthMonitorRequests =        (IncrementalSubscription)blackboard.subscribe(healthMonitorRequestPredicate);    // Publish SearchCommunity request to look for Robustness Communities    searchRequests =      (IncrementalSubscription)blackboard.subscribe(searchCommunityPredicate);    UID searchRequestUID = uidService.nextUID();    myUIDs.add(searchRequestUID);    blackboard.publishAdd(new SearchCommunity(null,                                              "(CommunityType=" + COMMUNITY_TYPE + ")",                                              false,                                              searchRequestUID,                                              Community.COMMUNITIES_ONLY));    // Start timer to periodically check status of agents    getAlarmService().addRealTimeAlarm(new NodeCheckTimer(NODE_CHECK_INTERVAL));  }