2 * Copyright (c) 2017 Pantheon Technologies 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
9 package org.opendaylight.openflowplugin.impl.services;
11 import java.util.concurrent.Future;
12 import org.opendaylight.openflowplugin.api.openflow.device.DeviceContext;
13 import org.opendaylight.openflowplugin.api.openflow.device.RequestContextStack;
14 import org.opendaylight.openflowplugin.extension.api.core.extension.ExtensionConverterProvider;
15 import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.mp.message.service.rev151020.SendExperimenterMpRequestInput;
16 import org.opendaylight.yang.gen.v1.urn.opendaylight.experimenter.mp.message.service.rev151020.SendExperimenterMpRequestOutput;
17 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
18 import org.opendaylight.yangtools.yang.common.RpcResult;
20 public abstract class AbstractExperimenterMultipartService<T extends OfHeader> extends AbstractMultipartService<SendExperimenterMpRequestInput, T> {
22 private final ExtensionConverterProvider extensionConverterProvider;
24 protected AbstractExperimenterMultipartService(RequestContextStack requestContextStack, DeviceContext deviceContext,
25 ExtensionConverterProvider extensionConverterProvider) {
26 super(requestContextStack, deviceContext);
27 this.extensionConverterProvider = extensionConverterProvider;
31 * Get extension converter provider
32 * @return extension converter provider
34 protected ExtensionConverterProvider getExtensionConverterProvider() {
35 return extensionConverterProvider;
39 * Process experimenter input and result experimenter output
40 * @param input experimenter input
41 * @return experimenter output
43 public abstract Future<RpcResult<SendExperimenterMpRequestOutput>> handleAndReply(SendExperimenterMpRequestInput input);