blob: f76007f7e8c4d923a5ec2736f851dc6ea52d1b0c [file] [log] [blame]
jiangruie3d60b12015-11-25 16:27:04 +08001/*
2 * Copyright 2015 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.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 */
37 FLOATINGIP_DELETE
38 }
39
40 /**
41 * Creates an event of a given type and for the specified Floating IP.
42 *
43 * @param type Floating IP event type
44 * @param floagingIp Floating IP subject
45 */
46 public FloatingIpEvent(Type type, FloatingIp floagingIp) {
47 super(type, floagingIp);
48 }
49
50 /**
51 * Creates an event of a given type and for the specified Floating IP.
52 *
53 * @param type Floating IP event type
54 * @param floagingIp Floating IP subject
55 * @param time occurrence time
56 */
57 public FloatingIpEvent(Type type, FloatingIp floagingIp, long time) {
58 super(type, floagingIp, time);
59 }
60}