}
return JobResult.FAILED;
}
});
final ServiceRegistration eh1Reg = this.registerEventHandler(NotificationConstants.TOPIC_JOB_CANCELLED,
new EventHandler() {
@Override
public void handleEvent(Event event) {
final String id = (String)event.getProperty("id");
cancelled.add(id);
}
});
final ServiceRegistration eh2Reg = this.registerEventHandler(NotificationConstants.TOPIC_JOB_FAILED,
new EventHandler() {
@Override
public void handleEvent(Event event) {
final String id = (String)event.getProperty("id");
failed.add(id);
}
});
final ServiceRegistration eh3Reg = this.registerEventHandler(NotificationConstants.TOPIC_JOB_FINISHED,
new EventHandler() {
@Override
public void handleEvent(Event event) {
final String id = (String)event.getProperty("id");
finished.add(id);
}
});
final ServiceRegistration eh4Reg = this.registerEventHandler(NotificationConstants.TOPIC_JOB_STARTED,
new EventHandler() {
@Override
public void handleEvent(Event event) {
final String id = (String)event.getProperty("id");
started.add(id);