org.apache.sling.event.impl.dea
Class DistributedEventReceiver

java.lang.Object
  extended by org.apache.sling.event.impl.dea.DistributedEventReceiver
All Implemented Interfaces:
Runnable, org.apache.sling.discovery.TopologyEventListener, org.osgi.service.event.EventHandler

@Service(value={org.osgi.service.event.EventHandler.class,java.lang.Runnable.class,org.apache.sling.discovery.TopologyEventListener.class})
@Properties(value={@Property(name="event.topics",value="*"),@Property(name="event.filter",value="(event.distribute=*)"),@Property(name="scheduler.period",longValue=1800L),@Property(name="scheduler.concurrent",boolValue=false)})
public class DistributedEventReceiver
extends Object
implements org.osgi.service.event.EventHandler, Runnable, org.apache.sling.discovery.TopologyEventListener

This is the distributed event receiver. It listens for all distributable events and stores them in the repository for other cluster instances to pick them up. We schedule this event handler to run in the background and clean up obsolete events.


Constructor Summary
DistributedEventReceiver()
           
 
Method Summary
protected  void activate()
           
protected  void deactivate()
          Deactivate this component.
 void handleEvent(org.osgi.service.event.Event event)
           
 void handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)
           
 void run()
          This method is invoked periodically.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DistributedEventReceiver

public DistributedEventReceiver()
Method Detail

activate

@Activate
protected void activate()

deactivate

protected void deactivate()
Deactivate this component.


handleEvent

public void handleEvent(org.osgi.service.event.Event event)
Specified by:
handleEvent in interface org.osgi.service.event.EventHandler
See Also:
EventHandler.handleEvent(org.osgi.service.event.Event)

run

public void run()
This method is invoked periodically.

Specified by:
run in interface Runnable
See Also:
Runnable.run()

handleTopologyEvent

public void handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)
Specified by:
handleTopologyEvent in interface org.apache.sling.discovery.TopologyEventListener
See Also:
TopologyEventListener.handleTopologyEvent(org.apache.sling.discovery.TopologyEvent)


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.