Andrea Campanella | f9c409a | 2017-07-13 14:14:41 +0200 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2017-present Open Networking Foundation |
| 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 | */ |
| 16 | |
Carmelo Cascone | 39c28ca | 2017-11-15 13:03:57 -0800 | [diff] [blame] | 17 | package org.onosproject.net.pi.service; |
Andrea Campanella | f9c409a | 2017-07-13 14:14:41 +0200 | [diff] [blame] | 18 | |
| 19 | import com.google.common.annotations.Beta; |
| 20 | import org.onosproject.event.AbstractEvent; |
| 21 | import org.onosproject.net.DeviceId; |
| 22 | |
| 23 | /** |
| 24 | * Entity that represents pipeconf to device binding events. |
| 25 | */ |
| 26 | @Beta |
Carmelo Cascone | 39c28ca | 2017-11-15 13:03:57 -0800 | [diff] [blame] | 27 | public final class PiPipeconfDeviceMappingEvent extends AbstractEvent<PiPipeconfDeviceMappingEvent.Type, DeviceId> { |
Andrea Campanella | f9c409a | 2017-07-13 14:14:41 +0200 | [diff] [blame] | 28 | |
| 29 | /** |
| 30 | * Type of pipeconf to device mapping event. |
| 31 | */ |
| 32 | public enum Type { |
| 33 | |
| 34 | /** |
| 35 | * Individual mapping pipeconf to device added. |
| 36 | */ |
| 37 | CREATED, |
| 38 | |
| 39 | /** |
| 40 | * Individual mapping pipeconf to device removed. |
| 41 | */ |
| 42 | REMOVED, |
| 43 | } |
| 44 | |
| 45 | /** |
| 46 | * Creates an event due to one Pipeconf being mapped to a device. |
| 47 | * |
| 48 | * @param type event type |
| 49 | * @param deviceId the deviceId for which the pipeconf was bound or updated. |
| 50 | */ |
| 51 | public PiPipeconfDeviceMappingEvent(PiPipeconfDeviceMappingEvent.Type type, DeviceId deviceId) { |
| 52 | super(type, deviceId); |
| 53 | } |
| 54 | |
| 55 | } |