Thomas Vachuska | 58de416 | 2015-09-10 16:15:33 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | 5ab426f | 2016-04-09 01:19:45 -0700 | [diff] [blame] | 2 | * Copyright 2015-present Open Networking Laboratory |
Thomas Vachuska | 58de416 | 2015-09-10 16:15:33 -0700 | [diff] [blame] | 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 | */ |
Marc De Leenheer | b473b9d | 2015-02-06 15:21:03 -0800 | [diff] [blame] | 16 | package org.onosproject.store.device.impl; |
| 17 | |
| 18 | import com.google.common.base.MoreObjects; |
| 19 | import org.onosproject.net.DeviceId; |
| 20 | import org.onosproject.net.device.PortDescription; |
| 21 | import org.onosproject.net.provider.ProviderId; |
| 22 | |
| 23 | import java.util.List; |
| 24 | |
Yuta HIGUCHI | f15065e | 2016-08-30 14:01:51 -0700 | [diff] [blame] | 25 | /** |
| 26 | * Remnant of ConfigProvider. |
| 27 | * @deprecated in Hummingbird(1.7.0) |
| 28 | */ |
| 29 | @Deprecated |
Marc De Leenheer | b473b9d | 2015-02-06 15:21:03 -0800 | [diff] [blame] | 30 | public class PortInjectedEvent { |
| 31 | |
| 32 | private ProviderId providerId; |
| 33 | private DeviceId deviceId; |
| 34 | private List<PortDescription> portDescriptions; |
| 35 | |
| 36 | protected PortInjectedEvent(ProviderId providerId, DeviceId deviceId, List<PortDescription> portDescriptions) { |
| 37 | this.providerId = providerId; |
| 38 | this.deviceId = deviceId; |
| 39 | this.portDescriptions = portDescriptions; |
| 40 | } |
| 41 | |
| 42 | public DeviceId deviceId() { |
| 43 | return deviceId; |
| 44 | } |
| 45 | |
| 46 | public ProviderId providerId() { |
| 47 | return providerId; |
| 48 | } |
| 49 | |
| 50 | public List<PortDescription> portDescriptions() { |
| 51 | return portDescriptions; |
| 52 | } |
| 53 | |
| 54 | @Override |
| 55 | public String toString() { |
| 56 | return MoreObjects.toStringHelper(getClass()) |
| 57 | .add("providerId", providerId) |
| 58 | .add("deviceId", deviceId) |
| 59 | .add("portDescriptions", portDescriptions) |
| 60 | .toString(); |
| 61 | } |
| 62 | |
| 63 | // for serializer |
| 64 | protected PortInjectedEvent() { |
| 65 | this.providerId = null; |
| 66 | this.deviceId = null; |
| 67 | this.portDescriptions = null; |
| 68 | } |
| 69 | |
| 70 | } |