org.apache.sling.discovery.impl
Class DiscoveryServiceImpl

java.lang.Object
  extended by org.apache.sling.discovery.impl.DiscoveryServiceImpl
All Implemented Interfaces:
org.apache.sling.discovery.DiscoveryService

@Service(value={org.apache.sling.discovery.DiscoveryService.class,DiscoveryServiceImpl.class})
public class DiscoveryServiceImpl
extends Object
implements org.apache.sling.discovery.DiscoveryService

This implementation of the cross-cluster service uses the view manager implementation for detecting changes in a cluster and only supports one cluster (of which this instance is part of).


Constructor Summary
DiscoveryServiceImpl()
           
 
Method Summary
protected  void activate()
          Activate this service
protected  void bindPropertyProvider(org.apache.sling.discovery.PropertyProvider propertyProvider, Map<String,Object> props)
          Bind a new property provider.
protected  void bindTopologyEventListener(org.apache.sling.discovery.TopologyEventListener eventListener)
          bind a topology event listener
protected  void deactivate()
          Deactivate this service
 void forcedShutdown()
          SLING-2901 : send a TOPOLOGY_CHANGING event and shutdown the service thereafter
 org.apache.sling.discovery.TopologyView getTopology()
           
 void handleTopologyChanged()
          Handle the fact that the topology has likely changed
protected  void unbindPropertyProvider(org.apache.sling.discovery.PropertyProvider propertyProvider, Map<String,Object> props)
          Unbind a property provider
protected  void unbindTopologyEventListener(org.apache.sling.discovery.TopologyEventListener eventListener)
          Unbind a topology event listener
protected  void updatedPropertyProvider(org.apache.sling.discovery.PropertyProvider propertyProvider, Map<String,Object> props)
          Update a property provider.
 void updateProperties()
          Update the properties and sent a topology event if applicable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DiscoveryServiceImpl

public DiscoveryServiceImpl()
Method Detail

activate

@Activate
protected void activate()
Activate this service


deactivate

@Deactivate
protected void deactivate()
Deactivate this service


bindTopologyEventListener

protected void bindTopologyEventListener(org.apache.sling.discovery.TopologyEventListener eventListener)
bind a topology event listener


unbindTopologyEventListener

protected void unbindTopologyEventListener(org.apache.sling.discovery.TopologyEventListener eventListener)
Unbind a topology event listener


bindPropertyProvider

protected void bindPropertyProvider(org.apache.sling.discovery.PropertyProvider propertyProvider,
                                    Map<String,Object> props)
Bind a new property provider.


updatedPropertyProvider

protected void updatedPropertyProvider(org.apache.sling.discovery.PropertyProvider propertyProvider,
                                       Map<String,Object> props)
Update a property provider.


unbindPropertyProvider

protected void unbindPropertyProvider(org.apache.sling.discovery.PropertyProvider propertyProvider,
                                      Map<String,Object> props)
Unbind a property provider


getTopology

public org.apache.sling.discovery.TopologyView getTopology()
Specified by:
getTopology in interface org.apache.sling.discovery.DiscoveryService
See Also:
DiscoveryService.getTopology()

updateProperties

public void updateProperties()
Update the properties and sent a topology event if applicable


handleTopologyChanged

public void handleTopologyChanged()
Handle the fact that the topology has likely changed


forcedShutdown

public void forcedShutdown()
SLING-2901 : send a TOPOLOGY_CHANGING event and shutdown the service thereafter



Copyright © 2007–2014 The Apache Software Foundation. All rights reserved.