blob: 4b03d1348889aaf1a9c0dc70aba1c4ea138d645b [file] [log] [blame]
Jian Li95edb592017-01-29 08:42:07 +09001/*
2 * Copyright 2017-present 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.mapping;
17
18import org.onosproject.event.AbstractEvent;
19
20/**
21 * Describes mapping event.
22 */
23public class MappingEvent extends AbstractEvent<MappingEvent.Type, Mapping> {
24
25 public enum Type {
26
27 /**
28 * Signifies that a new mapping has been detected.
29 */
30 MAPPING_ADDED,
31
32 /**
33 * Signifies that a new mapping has been removed.
34 */
35 MAPPING_REMOVED,
36
37 /**
38 * Signifies that a mapping has been updated.
39 */
40 MAPPING_UPDATED,
41
42 // internal event between Manager <-> Store
43
44 /**
45 * Signifies that a request to add mapping has been added to the store.
46 */
47 MAPPING_ADD_REQUESTED,
48
49 /**
50 * Signifies that a request to update mapping has been added to the store.
51 */
52 MAPPING_UPDATE_REQUESTED,
53
54 /**
55 * Signifies that a request to remove flow rule has been added to the store.
56 */
57 MAPPING_REMOVE_REQUESTED,
58 }
59
60 public MappingEvent(Type type, Mapping mapping) {
61 super(type, mapping);
62 }
63}