Bug 1764 - created new bundle responsible for default OF switch configuration
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / md / core / IMDMessageTranslator.java
1 /**
2  * Copyright (c) 2013 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.api.openflow.md.core;
9
10 import org.opendaylight.openflowplugin.api.openflow.md.core.session.SessionContext;
11
12 /**
13  * translates between messages
14  * @param <IN> source message type
15  * @param <OUT> result message type
16  */
17 public interface IMDMessageTranslator<IN, OUT> {
18
19     /**
20      * This method is called in order to translate message to MD-SAL or from MD-SAL. 
21      * 
22      * @param cookie 
23      *            auxiliary connection identifier 
24      * @param sc
25      *            The SessionContext which sent the OF message
26      * @param msg
27      *            The OF message
28      *            
29      * @return translated message
30      */
31     public OUT translate(SwitchConnectionDistinguisher cookie, SessionContext sc, IN msg);
32
33 }