*
*/
public void destroy() {
+ pluginProvider.close();
+ super.destroy();
}
@Override
private ConnectionConductor.CONDUCTOR_STATE conductorState;
private Short version;
- private SwitchConnectionDistinguisher auxiliaryKey;
+ protected SwitchConnectionDistinguisher auxiliaryKey;
- private SessionContext sessionContext;
+ protected SessionContext sessionContext;
private QueueKeeper<OfHeader, DataObject> queueKeeper;
private ExecutorService hsPool;
disconnect();
OFSessionUtil.getSessionManager().invalidateOnDisconnect(ConnectionConductorImpl.this);
} else {
- LOG.debug("first idle state occured");
+ LOG.debug("first idle state occured, sessionCtx={}|auxId={}", sessionContext, auxiliaryKey);
EchoInputBuilder builder = new EchoInputBuilder();
builder.setVersion(getVersion());
builder.setXid(getSessionContext().getNextXid());
@Override
public Future<Boolean> disconnect() {
- LOG.info("disconnecting: sessionCtx="+sessionContext+"|auxId="+auxiliaryKey);
+ LOG.info("disconnecting: sessionCtx={}|auxId={}", sessionContext, auxiliaryKey);
Future<Boolean> result = null;
if (connectionAdapter.isAlive()) {
@Override
public long getSwitchIdleTimeout() {
- return 5000;
+ return 15000;
}
@Override
@Override
public long getSwitchIdleTimeout() {
- return 5000;
+ return 15000;
}
@Override
/**
* OFPlugin provider implementation
*/
-public class OpenflowPluginProvider implements BindingAwareProvider {
+public class OpenflowPluginProvider implements BindingAwareProvider, AutoCloseable {
private BindingAwareBroker broker;
messageCountCommandProvider = new MessageCountCommandProvider(context, messageCountProvider);
messageCountCommandProvider.onSessionInitiated(session);
}
+
+ @Override
+ public void close() {
+ mdController.stop();
+ }
@Override
public void onSessionInitialized(ConsumerContext session) {
final class FlowEventListener implements SalFlowListener {
- List<FlowAdded> addedFlows = new ArrayList<>();
- List<FlowRemoved> removedFlows = new ArrayList<>();
- List<FlowUpdated> updatedFlows = new ArrayList<>();
-
@Override
public void onFlowAdded(FlowAdded notification) {
LOG.info("flow to be added.........................." + notification.toString());
LOG.info("added flow Xid........................." + notification.getTransactionId().getValue());
LOG.info("-----------------------------------------------------------------------------------");
- addedFlows.add(notification);
}
@Override
LOG.debug("removed flow.........................." + notification.toString());
LOG.debug("remove flow Xid........................." + notification.getTransactionId().getValue());
LOG.debug("-----------------------------------------------------------------------------------");
- removedFlows.add(notification);
- };
+ }
@Override
public void onFlowUpdated(FlowUpdated notification) {
LOG.debug("updated flow.........................." + notification.toString());
LOG.debug("updated flow Xid........................." + notification.getTransactionId().getValue());
LOG.debug("-----------------------------------------------------------------------------------");
- updatedFlows.add(notification);
}
@Override