blob: bbbd993e721e77244d1e12093fcf700abdb3787e [file] [log] [blame]
kmcpeake4fe18c82015-11-17 20:07:39 +00001/*
2 * Copyright 2014 Open Networking Laboratory
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.onosproject.incubator.net.faultmanagement.alarm;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Entity that represents Alarm events.
22 */
23public class AlarmEvent extends AbstractEvent<AlarmEvent.Type, Alarm> {
24
25
26 /**
27 * Creates an event of a given type and for the specified alarm and the
28 * current time.
29 *
30 * @param type topology event type
31 * @param alarm the alarm
32 */
33 public AlarmEvent(Type type, Alarm alarm) {
34 super(type, alarm);
35 }
36
37 /**
38 * Creates an event of a given type and for the specified alarm and time.
39 *
40 * @param type link event type
41 * @param alarm the alarm
42 * @param time occurrence time
43 */
44 public AlarmEvent(Type type, Alarm alarm,
45 long time) {
46 super(type, alarm, time);
47 }
48
49 /**
50 * Type of alarm events.
51 */
52 public enum Type {
53 /**
54 * A Raised Alarm.
55 */
56 RAISE,
57
58 /**
59 * A Cleared Alarm.
60 */
61 CLEAR
62 }
63
64
65}