blob: 04e1d9f5a0a382fee363fb11be82f80eadcfe8b4 [file] [log] [blame]
jiangruie3d60b12015-11-25 16:27:04 +08001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
jiangruie3d60b12015-11-25 16:27:04 +08003 *
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.vtnrsc.floatingip;
17
18import org.onosproject.event.AbstractEvent;
19import org.onosproject.vtnrsc.FloatingIp;
20
21/**
22 * Describes network Floating IP event.
23 */
24public class FloatingIpEvent
25 extends AbstractEvent<FloatingIpEvent.Type, FloatingIp> {
26 /**
27 * Type of Floating IP events.
28 */
29 public enum Type {
30 /**
31 * Signifies that Floating IP has been created.
32 */
33 FLOATINGIP_PUT,
34 /**
35 * Signifies that Floating IP has been deleted.
36 */
lishuai762df812016-01-08 11:51:15 +080037 FLOATINGIP_DELETE,
38 /**
39 * Signifies that Floating IP has been bound.
40 */
41 FLOATINGIP_BIND,
42 /**
43 * Signifies that Floating IP has been unbound.
44 */
45 FLOATINGIP_UNBIND
jiangruie3d60b12015-11-25 16:27:04 +080046 }
47
48 /**
49 * Creates an event of a given type and for the specified Floating IP.
50 *
51 * @param type Floating IP event type
52 * @param floagingIp Floating IP subject
53 */
54 public FloatingIpEvent(Type type, FloatingIp floagingIp) {
55 super(type, floagingIp);
56 }
57
58 /**
59 * Creates an event of a given type and for the specified Floating IP.
60 *
61 * @param type Floating IP event type
62 * @param floagingIp Floating IP subject
63 * @param time occurrence time
64 */
65 public FloatingIpEvent(Type type, FloatingIp floagingIp, long time) {
66 super(type, floagingIp, time);
67 }
68}