src/main/java/org/apache/sling/discovery/impl/cluster/voting/VotingHandler.java [156:178]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void registerEventHandler() {
        BundleContext bundleContext = context == null ? null : context.getBundleContext();
        if (bundleContext == null) {
            logger.info("registerEventHandler: context or bundleContext is null - cannot register");
            return;
        }
        Dictionary<String,Object> properties = new Hashtable<String,Object>();
        properties.put(Constants.SERVICE_DESCRIPTION, "Voting Event Listener");
        String[] topics = new String[] {
                SlingConstants.TOPIC_RESOURCE_ADDED,
                SlingConstants.TOPIC_RESOURCE_CHANGED,
                SlingConstants.TOPIC_RESOURCE_REMOVED };
        properties.put(EventConstants.EVENT_TOPIC, topics);
        String path = config.getDiscoveryResourcePath();
        if (path.endsWith("/")) {
            path = path.substring(0, path.length()-1);
        }
        path = path + "/*";
        properties.put(EventConstants.EVENT_FILTER, "(&(path="+path+"))");
        eventHandlerRegistration = bundleContext.registerService(
                EventHandler.class.getName(), this, properties);
        logger.info("registerEventHandler: VotingHandler registered as EventHandler");
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/main/java/org/apache/sling/discovery/impl/cluster/ClusterViewChangeListener.java [82:104]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    private void registerEventHandler() {
        BundleContext bundleContext = context == null ? null : context.getBundleContext();
        if (bundleContext == null) {
            logger.info("registerEventHandler: context or bundleContext is null - cannot register");
            return;
        }
        Dictionary<String,Object> properties = new Hashtable<String,Object>();
        properties.put(Constants.SERVICE_DESCRIPTION, "Cluster View Change Listener");
        String[] topics = new String[] {
                SlingConstants.TOPIC_RESOURCE_ADDED,
                SlingConstants.TOPIC_RESOURCE_CHANGED,
                SlingConstants.TOPIC_RESOURCE_REMOVED };
        properties.put(EventConstants.EVENT_TOPIC, topics);
        String path = config.getDiscoveryResourcePath();
        if (path.endsWith("/")) {
            path = path.substring(0, path.length()-1);
        }
        path = path + "/*";
        properties.put(EventConstants.EVENT_FILTER, "(&(path="+path+"))");
        eventHandlerRegistration = bundleContext.registerService(
                EventHandler.class.getName(), this, properties);
        logger.info("registerEventHandler: ClusterViewChangeHandler registered as EventHandler");
    }
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



