THere is more information here:
http://blogs.adobe.com/experiencedelivers/experience-management/event_handling_incq/
But there does not look like there is a way to only fire on a path. Code:
@Component
@Service
@Property(name="event.topics",value= {ReplicationAction.EVENT_TOPIC, Example.EVENT_TOPIC})
public class ExampleEventHandler implements EventHandler {
Logger log = LoggerFactory.getLogger(this.getClass());
public void handleEvent(Event event) {
if (event.getTopic().equals(Example.EVENT_TOPIC)){
log.info("Example {}, with description {} has been created...",event.getProperty(Example.PN_NAME),event.getProperty(Example.PN_DESC));
} else if (event.getTopic().equals(ReplicationAction.EVENT_TOPIC)){
ReplicationAction action = ReplicationAction.fromEvent(event);
log.info("User {} has tried to replicate {}",action.getUserId(),action.getPath());
}
}
}
As stated - you can get the path and invoke app logic if a path is correct. But once the hanlder is installed and running - it will fire when ever a replication event occurs. That is - the Handler listens for all replication events.