Speed up packetin throttling
[openflowplugin.git] / openflowplugin-api / src / main / java / org / opendaylight / openflowplugin / api / openflow / connection / ConnectionContext.java
index 025fc8bebc592e9879140671a59012b717496334..bbbffdc0f2d196a70b4778661af7f13942edc59d 100644 (file)
@@ -9,6 +9,8 @@
 package org.opendaylight.openflowplugin.api.openflow.connection;
 
 import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
+import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueue;
+import org.opendaylight.openflowjava.protocol.api.connection.OutboundQueueHandlerRegistration;
 import org.opendaylight.openflowplugin.api.openflow.device.handlers.DeviceDisconnectedHandler;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.inventory.rev130819.NodeId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.FeaturesReply;
@@ -20,7 +22,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731
  * </p>
  * Created by Martin Bobak &lt;mbobak@cisco.com&gt; on 25.2.2015.
  */
-public interface ConnectionContext {
+public interface ConnectionContext extends AutoCloseable {
 
     /**
      * distinguished connection states
@@ -63,6 +65,17 @@ public interface ConnectionContext {
      */
     ConnectionAdapter getConnectionAdapter();
 
+    /**
+     * Returns reference to OFJava outbound queue provider. Outbound queue is used for outbound messages processing.
+     *
+     * @return
+     */
+    OutboundQueue getOutboundQueueProvider();
+    /**
+     * Method sets reference to OFJava outbound queue provider.
+     *
+     */
+    void setOutboundQueueProvider(OutboundQueueProvider  outboundQueueProvider);
 
     /**
      * Method returns current connection state.
@@ -99,4 +112,9 @@ public interface ConnectionContext {
      * Method provides propagates info about closed connection to handler for handling closing connections.
      */
     void propagateClosingConnection();
+
+    void setOutboundQueueHandleRegistration(OutboundQueueHandlerRegistration<OutboundQueueProvider> outboundQueueHandlerRegistration);
+
+    @Override
+    void close();
 }