2 * Copyright (c) 2024 PANTHEON.tech, s.r.o. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.openflowplugin.impl.services.sal;
10 import org.eclipse.jdt.annotation.NonNull;
11 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
12 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
13 import org.opendaylight.openflowplugin.impl.services.multilayer.MultiLayerFlowService;
14 import org.opendaylight.openflowplugin.impl.services.singlelayer.SingleLayerFlowService;
15 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
16 import org.opendaylight.yangtools.yang.binding.RpcOutput;
18 abstract class AbstractFlowRpc<O extends RpcOutput> extends AbstractDeviceRpc {
19 final @NonNull MultiLayerFlowService<O> multi;
20 final @NonNull SingleLayerFlowService<O> single;
22 AbstractFlowRpc(final RequestContextStack requestContextStack, final DeviceContext deviceContext,
23 final ConvertorExecutor convertorExecutor, final Class<O> output) {
25 multi = new MultiLayerFlowService<>(requestContextStack, deviceContext, output, convertorExecutor);
26 single = new SingleLayerFlowService<>(requestContextStack, deviceContext, output);