|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.event.impl.jobs.timed.TimedEventSender
@Service(value={TimedEventStatusProvider.class,org.osgi.service.event.EventHandler.class,org.apache.sling.discovery.TopologyEventListener.class}) @Property(name="event.topics", value={"org/apache/sling/api/resource/Resource/ADDED","org/apache/sling/api/resource/Resource/REMOVED","org/apache/sling/api/resource/Resource/CHANGED","org/osgi/framework/BundleEvent/STARTED","org/osgi/framework/BundleEvent/UPDATED"}) public class TimedEventSender
An event handler for timed events.
Field Summary |
---|
Fields inherited from interface org.apache.sling.event.TimedEventStatusProvider |
---|
PROPERTY_EVENT_ID |
Constructor Summary | |
---|---|
TimedEventSender()
|
Method Summary | |
---|---|
protected void |
activate()
Activate this component. |
void |
cancelTimedEvent(String jobId)
Cancel this timed event. |
protected void |
deactivate()
Deactivate this component. |
void |
execute(org.apache.sling.commons.scheduler.JobContext context)
|
org.osgi.service.event.Event |
getScheduledEvent(String topic,
String eventId,
String jobId)
Return the scheduled event with the given id. |
Collection<org.osgi.service.event.Event> |
getScheduledEvents(String topic,
Map<String,Object>... filterProps)
Return a list of currently scheduled events. |
void |
handleEvent(org.osgi.service.event.Event event)
|
void |
handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)
|
protected boolean |
processEvent(org.osgi.service.event.Event event,
org.apache.sling.event.impl.jobs.timed.ScheduleInfo scheduleInfo)
Process the event. |
protected void |
runInBackground()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimedEventSender()
Method Detail |
---|
@Activate protected void activate()
@Deactivate protected void deactivate()
protected void runInBackground()
org.apache.sling.event.impl.AbstractRepositoryEventHandler#runInBackground()
protected boolean processEvent(org.osgi.service.event.Event event, org.apache.sling.event.impl.jobs.timed.ScheduleInfo scheduleInfo)
event
- The incoming event.
public void handleEvent(org.osgi.service.event.Event event)
handleEvent
in interface org.osgi.service.event.EventHandler
EventHandler.handleEvent(org.osgi.service.event.Event)
public void execute(org.apache.sling.commons.scheduler.JobContext context)
execute
in interface org.apache.sling.commons.scheduler.Job
Job.execute(org.apache.sling.commons.scheduler.JobContext)
public org.osgi.service.event.Event getScheduledEvent(String topic, String eventId, String jobId)
TimedEventStatusProvider
getScheduledEvent
in interface TimedEventStatusProvider
TimedEventStatusProvider.getScheduledEvent(java.lang.String, java.lang.String, java.lang.String)
public Collection<org.osgi.service.event.Event> getScheduledEvents(String topic, Map<String,Object>... filterProps)
TimedEventStatusProvider
getScheduledEvents
in interface TimedEventStatusProvider
topic
- Topic can be used as a filter, if it is non-null, only jobs with this topic will be returned.filterProps
- A list of filter property maps. Each map acts like a template. The searched event
must match the template (AND query). By providing several maps, different filters
are possible (OR query).
TimedEventStatusProvider.getScheduledEvents(java.lang.String, java.util.Map...)
public void cancelTimedEvent(String jobId)
TimedEventStatusProvider
cancelTimedEvent
in interface TimedEventStatusProvider
jobId
- The unique identifier as found in the property TimedEventStatusProvider.PROPERTY_EVENT_ID
.TimedEventStatusProvider.cancelTimedEvent(java.lang.String)
public void handleTopologyEvent(org.apache.sling.discovery.TopologyEvent event)
handleTopologyEvent
in interface org.apache.sling.discovery.TopologyEventListener
TopologyEventListener.handleTopologyEvent(org.apache.sling.discovery.TopologyEvent)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |