package org.opendaylight.openflowplugin.openflow.md.core;
+import java.util.List;
+import java.util.concurrent.Future;
+
+import org.opendaylight.openflowjava.protocol.api.connection.ConnectionAdapter;
+import org.opendaylight.openflowplugin.openflow.md.core.session.SessionContext;
+import org.opendaylight.openflowplugin.openflow.md.queue.QueueKeeper;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.OfHeader;
+import org.opendaylight.yangtools.yang.binding.DataObject;
+
+import com.google.common.collect.Lists;
+
/**
* @author mirehak
*/
-/**
- * @author mirehak
- *
- */
public interface ConnectionConductor {
/** distinguished connection states */
RIP
}
+ /** supported version ordered by height (highest version is at the beginning) */
+ public static final List<Short> versionOrder = Lists.newArrayList((short) 0x04, (short) 0x01);
+
/**
* initialize wiring around {@link #connectionAdapter}
*/
* @param conductorState
*/
public void setConductorState(CONDUCTOR_STATE conductorState);
+
+ /**
+ * terminates owned connection
+ * @return future result of disconnect action
+ */
+ public Future<Boolean> disconnect();
+
+ /**
+ * assign corresponding {@link SessionContext} to this conductor (to handle disconnect caused by switch)
+ * @param context
+ */
+ public void setSessionContext(SessionContext context);
+
+ /**
+ * assign corresponding {@link SwitchConnectionDistinguisher} to this conductor
+ * to handle disconnect caused by switch. This involves auxiliary conductors only.
+ * @param auxiliaryKey
+ */
+ public void setConnectionCookie(SwitchConnectionDistinguisher auxiliaryKey);
+
+ /**
+ * @return the sessionContext
+ */
+ public SessionContext getSessionContext();
+
+ /**
+ * @return the auxiliaryKey (null if this is a primary connection)
+ */
+ public SwitchConnectionDistinguisher getAuxiliaryKey();
+
+ /**
+ * @return the connectionAdapter
+ */
+ public ConnectionAdapter getConnectionAdapter();
+
+ /**
+ * assign global queueKeeper
+ * @param queueKeeper
+ */
+ void setQueueKeeper(QueueKeeper<OfHeader, DataObject> queueKeeper);
+
+ /**
+ * @param errorHandler for internal exception handling
+ */
+ void setErrorHandler(ErrorHandler errorHandler);
+
}