-
Notifications
You must be signed in to change notification settings - Fork 188
/
EventHandler.java
32 lines (26 loc) · 1.11 KB
/
EventHandler.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/*
* Copyright (c) 2010-2013 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.notifications.api;
import com.evolveum.midpoint.notifications.api.events.Event;
import com.evolveum.midpoint.schema.result.OperationResult;
import com.evolveum.midpoint.task.api.Task;
import com.evolveum.midpoint.util.exception.SchemaException;
import com.evolveum.midpoint.xml.ns._public.common.common_3.EventHandlerType;
public interface EventHandler<E extends Event, C extends EventHandlerType> {
/**
* @return true if we should continue with processing, false otherwise
*/
boolean processEvent(E event, C eventHandlerType, Task task, OperationResult result) throws SchemaException;
/**
* @return Type of events this handler is capable of handling.
*/
Class<E> getEventType();
/**
* @return Type of configuration objects for this event handler. The handler is selected based on exact match of this type.
*/
Class<C> getEventHandlerConfigurationType();
}