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>
21 extends AbstractMultipartService<SendExperimenterMpRequestInput, T> {
23 private final ExtensionConverterProvider extensionConverterProvider;
25 protected AbstractExperimenterMultipartService(RequestContextStack requestContextStack, DeviceContext deviceContext,
26 ExtensionConverterProvider extensionConverterProvider) {
27 super(requestContextStack, deviceContext);
28 this.extensionConverterProvider = extensionConverterProvider;
32 * Get extension converter provider.
33 * @return extension converter provider
35 protected ExtensionConverterProvider getExtensionConverterProvider() {
36 return extensionConverterProvider;
40 * Process experimenter input and result experimenter output.
41 * @param input experimenter input
42 * @return experimenter output
44 public abstract Future<RpcResult<SendExperimenterMpRequestOutput>>
45 handleAndReply(SendExperimenterMpRequestInput input);