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.MultiLayerMeterService;
14 import org.opendaylight.openflowplugin.impl.services.singlelayer.SingleLayerMeterService;
15 import org.opendaylight.openflowplugin.openflow.md.core.sal.convertor.ConvertorExecutor;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.meter.types.rev130918.Meter;
17 import org.opendaylight.yangtools.yang.binding.RpcOutput;
19 abstract class AbstractMeterRpc<I extends Meter, O extends RpcOutput> extends AbstractDeviceRpc {
20 final @NonNull MultiLayerMeterService<I, O> multi;
21 final @NonNull SingleLayerMeterService<O> single;
23 AbstractMeterRpc(final RequestContextStack requestContextStack, final DeviceContext deviceContext,
24 final ConvertorExecutor convertorExecutor, final Class<O> output) {
26 multi = new MultiLayerMeterService<>(requestContextStack, deviceContext, output, convertorExecutor);
27 single = new SingleLayerMeterService<>(requestContextStack, deviceContext, output);