blob: 7bf9b591084af7ba5207af03c95dd37ce555ad16 [file] [log] [blame]
Thomas Vachuska58de4162015-09-10 16:15:33 -07001/*
Brian O'Connor5ab426f2016-04-09 01:19:45 -07002 * Copyright 2015-present Open Networking Laboratory
Thomas Vachuska58de4162015-09-10 16:15:33 -07003 *
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.DeviceDescription;
21import org.onosproject.net.provider.ProviderId;
22
23public class DeviceInjectedEvent {
24 private final ProviderId providerId;
25 private final DeviceId deviceId;
26 private final DeviceDescription deviceDescription;
27
28 protected DeviceInjectedEvent(
29 ProviderId providerId,
30 DeviceId deviceId,
31 DeviceDescription deviceDescription) {
32 this.providerId = providerId;
33 this.deviceId = deviceId;
34 this.deviceDescription = deviceDescription;
35 }
36
37 public DeviceId deviceId() {
38 return deviceId;
39 }
40
41 public ProviderId providerId() {
42 return providerId;
43 }
44
45 public DeviceDescription deviceDescription() {
46 return deviceDescription;
47 }
48
49 @Override
50 public String toString() {
51 return MoreObjects.toStringHelper(getClass())
52 .add("providerId", providerId)
53 .add("deviceId", deviceId)
54 .add("deviceDescription", deviceDescription)
55 .toString();
56 }
57
58 // for serializer
59 protected DeviceInjectedEvent() {
60 this.providerId = null;
61 this.deviceId = null;
62 this.deviceDescription = null;
63 }
64}