X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=openflowplugin-impl%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fopenflowplugin%2Fimpl%2Fservices%2FPacketProcessingServiceImpl.java;h=85e198ef24c6fd8c53ce1ec88e882451927be904;hb=b55780a64bdcd852e705d01255d837dab8996325;hp=03f1e0c0f03e7ec68ee40a74a55b4d1714b0f105;hpb=3c4699582dc3bcb0e3bb854ba4f73efacdb7f333;p=openflowplugin.git diff --git a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/PacketProcessingServiceImpl.java b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/PacketProcessingServiceImpl.java index 03f1e0c0f0..85e198ef24 100644 --- a/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/PacketProcessingServiceImpl.java +++ b/openflowplugin-impl/src/main/java/org/opendaylight/openflowplugin/impl/services/PacketProcessingServiceImpl.java @@ -1,6 +1,6 @@ /** * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. - * + * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License v1.0 which accompanies this distribution, * and is available at http://www.eclipse.org/legal/epl-v10.html @@ -8,29 +8,28 @@ package org.opendaylight.openflowplugin.impl.services; import java.util.concurrent.Future; -import org.opendaylight.openflowplugin.api.openflow.rpc.RpcContext; +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.openflow.md.core.sal.convertor.PacketOutConvertor; +import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader; 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.yangtools.yang.common.RpcResult; -/** - * @author joe - * - */ -// TODO: implement this -public class PacketProcessingServiceImpl extends CommonService implements PacketProcessingService { +public final class PacketProcessingServiceImpl extends AbstractVoidService implements PacketProcessingService { + public PacketProcessingServiceImpl(final RequestContextStack requestContextStack, final DeviceContext deviceContext) { + super(requestContextStack, deviceContext); + } - /* - * (non-Javadoc) - * - * @see - * org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.PacketProcessingService#transmitPacket - * (org.opendaylight.yang.gen.v1.urn.opendaylight.packet.service.rev130709.TransmitPacketInput) - */ @Override public Future> transmitPacket(final TransmitPacketInput input) { - // TODO Auto-generated method stub - return null; + return handleServiceCall(input); + } + + @Override + protected OfHeader buildRequest(final Xid xid, final TransmitPacketInput input) { + return PacketOutConvertor.toPacketOutInput(input, getVersion(), xid.getValue(), getDatapathId()); } }