Marc De Leenheer | b473b9d | 2015-02-06 15:21:03 -0800 | [diff] [blame] | 1 | package org.onosproject.store.device.impl; |
| 2 | |
| 3 | import com.google.common.base.MoreObjects; |
| 4 | import org.onosproject.net.DeviceId; |
| 5 | import org.onosproject.net.device.PortDescription; |
| 6 | import org.onosproject.net.provider.ProviderId; |
| 7 | |
| 8 | import java.util.List; |
| 9 | |
| 10 | public class PortInjectedEvent { |
| 11 | |
| 12 | private ProviderId providerId; |
| 13 | private DeviceId deviceId; |
| 14 | private List<PortDescription> portDescriptions; |
| 15 | |
| 16 | protected PortInjectedEvent(ProviderId providerId, DeviceId deviceId, List<PortDescription> portDescriptions) { |
| 17 | this.providerId = providerId; |
| 18 | this.deviceId = deviceId; |
| 19 | this.portDescriptions = portDescriptions; |
| 20 | } |
| 21 | |
| 22 | public DeviceId deviceId() { |
| 23 | return deviceId; |
| 24 | } |
| 25 | |
| 26 | public ProviderId providerId() { |
| 27 | return providerId; |
| 28 | } |
| 29 | |
| 30 | public List<PortDescription> portDescriptions() { |
| 31 | return portDescriptions; |
| 32 | } |
| 33 | |
| 34 | @Override |
| 35 | public String toString() { |
| 36 | return MoreObjects.toStringHelper(getClass()) |
| 37 | .add("providerId", providerId) |
| 38 | .add("deviceId", deviceId) |
| 39 | .add("portDescriptions", portDescriptions) |
| 40 | .toString(); |
| 41 | } |
| 42 | |
| 43 | // for serializer |
| 44 | protected PortInjectedEvent() { |
| 45 | this.providerId = null; |
| 46 | this.deviceId = null; |
| 47 | this.portDescriptions = null; |
| 48 | } |
| 49 | |
| 50 | } |