BUG-4283 experimenter msg support - registration part
[openflowplugin.git] / extension / openflowplugin-extension-api / src / main / java / org / opendaylight / openflowplugin / extension / api / ConvertorMessageFromOFJava.java
1 /**
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.openflowplugin.extension.api;
9
10 import org.opendaylight.openflowplugin.extension.api.path.AugmentationPath;
11 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflowplugin.experimenter.types.rev151020.experimenter.core.message.ExperimenterMessageOfChoice;
12 import org.opendaylight.yangtools.yang.binding.DataContainer;
13
14 /**
15  * convert message from OFJava-API model into MD-SAL model
16  *
17  * @param <F> input message model - OFJava-API
18  * @param <P> represents possible paths in yang schema for augmentations
19  */
20 public interface ConvertorMessageFromOFJava<F extends DataContainer, P extends AugmentationPath> {
21
22     /**
23      * @param input
24      * @param path  in yang schema where a converted value has to be augmented
25      * @return message converted to MD-SAL and its type
26      */
27     ExperimenterMessageOfChoice convert(F input, P path);
28 }