re-activate FindBugs
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / services / sal / PacketProcessingServiceImpl.java
index 7419940413b99ff134f5750e536fa0cd48b23fe4..dea40a78f39befd820fa30311f267de6012025a7 100644 (file)
@@ -7,39 +7,43 @@
  */
 package org.opendaylight.openflowplugin.impl.services.sal;
 
+import com.google.common.util.concurrent.ListenableFuture;
 import java.util.Optional;
-import java.util.concurrent.Future;
 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.AbstractVoidService;
+import org.opendaylight.openflowplugin.impl.services.AbstractSimpleService;
 import org.opendaylight.openflowplugin.impl.services.util.ServiceException;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.PacketOutConvertor;
-import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.PacketOutConvertorData;
+import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.data.XidConvertorData;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.PacketOutInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketOutput;
 import org.opendaylight.yangtools.yang.common.RpcResult;
 
-public final class PacketProcessingServiceImpl extends AbstractVoidService<TransmitPacketInput> implements PacketProcessingService {
+public final class PacketProcessingServiceImpl extends AbstractSimpleService<TransmitPacketInput, TransmitPacketOutput>
+                                               implements PacketProcessingService {
 
     private final ConvertorExecutor convertorExecutor;
 
-    public PacketProcessingServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext, final ConvertorExecutor convertorExecutor) {
-        super(requestContextStack, deviceContext);
+    public PacketProcessingServiceImpl(final RequestContextStack requestContextStack,
+                                       final DeviceContext deviceContext,
+                                       final ConvertorExecutor convertorExecutor) {
+        super(requestContextStack, deviceContext, TransmitPacketOutput.class);
         this.convertorExecutor = convertorExecutor;
     }
 
     @Override
-    public Future<RpcResult<Void>> transmitPacket(final TransmitPacketInput input) {
+    public ListenableFuture<RpcResult<TransmitPacketOutput>> transmitPacket(final TransmitPacketInput input) {
         return handleServiceCall(input);
     }
 
     @Override
     protected OfHeader buildRequest(final Xid xid, final TransmitPacketInput input) throws ServiceException {
-        final PacketOutConvertorData data = new PacketOutConvertorData(getVersion());
+        final XidConvertorData data = new XidConvertorData(getVersion());
         data.setDatapathId(getDatapathId());
         data.setXid(xid.getValue());