fix port update - honor message version
[openflowplugin.git] / openflowplugin / src / main / java / org / opendaylight / openflowplugin / openflow / md / core / session / SessionManager.java
index 0dacd5dc16a9ec903a40418b611ff5cc9e10607e..19f40ca5bd82f1d17fcd7ef455e1a759ccfce388 100644 (file)
@@ -8,9 +8,21 @@
 
 package org.opendaylight.openflowplugin.openflow.md.core.session;
 
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+
+import org.opendaylight.controller.sal.binding.api.NotificationProviderService;
+import org.opendaylight.controller.sal.binding.api.data.DataProviderService;
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
 import org.opendaylight.openflowplugin.openflow.md.core.ConnectionConductor;
+import org.opendaylight.openflowplugin.openflow.md.core.IMDMessageTranslator;
 import org.opendaylight.openflowplugin.openflow.md.core.SwitchConnectionDistinguisher;
+import org.opendaylight.openflowplugin.openflow.md.core.TranslatorKey;
+import org.opendaylight.openflowplugin.openflow.md.queue.PopListener;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
+import org.opendaylight.yangtools.concepts.ListenerRegistration;
+import org.opendaylight.yangtools.yang.binding.DataObject;
 
 /**
  * @author mirehak
@@ -22,8 +34,7 @@ public interface SessionManager {
      * @return corresponding conductor, holding {@link ConnectionAdapter} to
      *         primary connection
      */
-    public SessionContext getSessionContext(
-            SwitchConnectionDistinguisher sessionKey);
+    public SessionContext getSessionContext(SwitchConnectionDistinguisher sessionKey);
 
     /**
      * disconnect all underlying {@link ConnectionAdapter}s and notify listeners
@@ -38,8 +49,7 @@ public interface SessionManager {
      * @param sessionKey
      * @param context
      */
-    public void addSessionContext(SwitchConnectionDistinguisher sessionKey,
-            SessionContext context);
+    public void addSessionContext(SwitchConnectionDistinguisher sessionKey, SessionContext context);
 
     /**
      * disconnect particular auxiliary {@link ConnectionAdapter}, identified by
@@ -55,4 +65,50 @@ public interface SessionManager {
      * @param connectionConductor
      */
     public void invalidateOnDisconnect(ConnectionConductor connectionConductor);
+
+    /**
+     * @param translatorMapping
+     */
+    public void setTranslatorMapping(Map<TranslatorKey, Collection<IMDMessageTranslator<OfHeader, List<DataObject>>>> translatorMapping);
+
+    /**
+     * @return translator mapping
+     */
+    public Map<TranslatorKey, Collection<IMDMessageTranslator<OfHeader, List<DataObject>>>> getTranslatorMapping();
+
+    /**
+     * @param notificationProviderService
+     */
+    public void setNotificationProviderService(NotificationProviderService notificationProviderService);
+
+    /**
+     * @return notificationServiceProvider
+     */
+    public DataProviderService getDataProviderService();
+
+    /**
+     * @param dataServiceProvider
+     */
+    public void setDataProviderService(DataProviderService dataServiceProvider);
+
+    /**
+     * @return notificationServiceProvider
+     */
+    public NotificationProviderService getNotificationProviderService();
+
+    /**
+     * @param listener
+     * @return registration
+     */
+    public ListenerRegistration<SessionListener> registerSessionListener(SessionListener listener);
+
+    /**
+     * @return popListener mapping, key=message type; value=collection of listeners
+     */
+    public Map<Class<? extends DataObject>, Collection<PopListener<DataObject>>> getPopListenerMapping();
+
+    /**
+     * @param popListenerMapping the popListenerMapping to set
+     */
+    void setPopListenerMapping(Map<Class<? extends DataObject>, Collection<PopListener<DataObject>>> popListenerMapping);
 }