blob: 971f53db93536382295bdfecd93503a31c338090 [file] [log] [blame]
Thomas Vachuska58de4162015-09-10 16:15:33 -07001/*
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 */
Marc De Leenheerb473b9d2015-02-06 15:21:03 -080016package org.onosproject.store.device.impl;
17
18import com.google.common.base.MoreObjects;
19import org.onosproject.net.DeviceId;
20import org.onosproject.net.device.PortDescription;
21import org.onosproject.net.provider.ProviderId;
22
23import java.util.List;
24
25public class PortInjectedEvent {
26
27 private ProviderId providerId;
28 private DeviceId deviceId;
29 private List<PortDescription> portDescriptions;
30
31 protected PortInjectedEvent(ProviderId providerId, DeviceId deviceId, List<PortDescription> portDescriptions) {
32 this.providerId = providerId;
33 this.deviceId = deviceId;
34 this.portDescriptions = portDescriptions;
35 }
36
37 public DeviceId deviceId() {
38 return deviceId;
39 }
40
41 public ProviderId providerId() {
42 return providerId;
43 }
44
45 public List<PortDescription> portDescriptions() {
46 return portDescriptions;
47 }
48
49 @Override
50 public String toString() {
51 return MoreObjects.toStringHelper(getClass())
52 .add("providerId", providerId)
53 .add("deviceId", deviceId)
54 .add("portDescriptions", portDescriptions)
55 .toString();
56 }
57
58 // for serializer
59 protected PortInjectedEvent() {
60 this.providerId = null;
61 this.deviceId = null;
62 this.portDescriptions = null;
63 }
64
65}