Merge "fix diagstatus NPE on showSvcStatus CLI"
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / statistics / services / AllPortStatsService.java
index 393dc43b95770831a678a663162048110ea60cd4..c15c936eb6512f95ebc96e20d2201ec77b088dcb 100644 (file)
@@ -13,8 +13,8 @@ import org.opendaylight.openflowplugin.api.OFConstants;
 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
 import org.opendaylight.openflowplugin.api.openflow.device.Xid;
-import org.opendaylight.openflowplugin.impl.services.RequestInputUtils;
-import org.opendaylight.openflowplugin.impl.services.ServiceException;
+import org.opendaylight.openflowplugin.impl.services.util.RequestInputUtils;
+import org.opendaylight.openflowplugin.impl.services.util.ServiceException;
 import org.opendaylight.openflowplugin.impl.statistics.services.compatibility.AbstractCompatibleStatService;
 import org.opendaylight.openflowplugin.impl.statistics.services.compatibility.NodeConnectorStatisticsToNotificationTransformer;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.flow.transaction.rev150304.TransactionId;
@@ -31,7 +31,9 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.G
 import org.opendaylight.yang.gen.v1.urn.opendaylight.port.statistics.rev131214.NodeConnectorStatisticsUpdate;
 
 final class AllPortStatsService
-        extends AbstractCompatibleStatService<GetAllNodeConnectorsStatisticsInput, GetAllNodeConnectorsStatisticsOutput, NodeConnectorStatisticsUpdate> {
+        extends AbstractCompatibleStatService<GetAllNodeConnectorsStatisticsInput,
+                                              GetAllNodeConnectorsStatisticsOutput,
+                                              NodeConnectorStatisticsUpdate> {
 
     private static final MultipartRequestPortStatsCase PORT_STATS_CASE;
 
@@ -47,12 +49,15 @@ final class AllPortStatsService
         PORT_STATS_CASE = caseBuilder.build();
     }
 
-    public AllPortStatsService(RequestContextStack requestContextStack, DeviceContext deviceContext, AtomicLong compatibilityXidSeed) {
+    AllPortStatsService(RequestContextStack requestContextStack,
+                               DeviceContext deviceContext,
+                               AtomicLong compatibilityXidSeed) {
         super(requestContextStack, deviceContext, compatibilityXidSeed);
     }
 
     @Override
-    protected OfHeader buildRequest(final Xid xid, final GetAllNodeConnectorsStatisticsInput input) throws ServiceException {
+    protected OfHeader buildRequest(final Xid xid,
+                                    final GetAllNodeConnectorsStatisticsInput input) throws ServiceException {
         MultipartRequestInputBuilder mprInput = RequestInputUtils
                 .createMultipartHeader(MultipartType.OFPMPPORTSTATS, xid.getValue(), getVersion());
         mprInput.setMultipartRequestBody(PORT_STATS_CASE);
@@ -65,7 +70,11 @@ final class AllPortStatsService
     }
 
     @Override
-    public NodeConnectorStatisticsUpdate transformToNotification(List<MultipartReply> result, TransactionId emulatedTxId) {
-        return NodeConnectorStatisticsToNotificationTransformer.transformToNotification(result, getDeviceInfo(), getOfVersion(), emulatedTxId);
+    public NodeConnectorStatisticsUpdate transformToNotification(List<MultipartReply> result,
+                                                                 TransactionId emulatedTxId) {
+        return NodeConnectorStatisticsToNotificationTransformer.transformToNotification(result,
+                                                                                        getDeviceInfo(),
+                                                                                        getOfVersion(),
+                                                                                        emulatedTxId);
     }
 }