tom | d735672 | 2014-08-26 01:07:39 -0700 | [diff] [blame^] | 1 | package org.onlab.onos.event; |
| 2 | |
| 3 | /** |
| 4 | * Abstraction of an event sink capable of processing the specified event types. |
| 5 | */ |
| 6 | public interface EventSink<E extends Event> { |
| 7 | |
| 8 | /** |
| 9 | * Processes the specified event. |
| 10 | * |
| 11 | * @param event event to be processed |
| 12 | */ |
| 13 | void process(E event); |
| 14 | |
| 15 | /** |
| 16 | * Reports a problem encountered while processing an event. |
| 17 | * |
| 18 | * @param event event being processed |
| 19 | * @param error error encountered while processing |
| 20 | */ |
| 21 | void reportProblem(E event, Throwable error); |
| 22 | |
| 23 | } |