* @author michal.polkorab
*
*/
-public class MockPlugin implements OpenflowProtocolListener, SwitchConnectionHandler,
+public class MockPlugin implements OpenflowProtocolListener, SwitchConnectionHandler,
SystemNotificationsListener, ConnectionReadyListener {
protected static final Logger LOGGER = LoggerFactory.getLogger(MockPlugin.class);
finishedFuture = SettableFuture.create();
LOGGER.debug("mockPlugin: "+System.identityHashCode(this));
}
-
+
@Override
public void onSwitchConnected(ConnectionAdapter connection) {
LOGGER.debug("onSwitchConnected: " + connection);
@Override
public void onErrorMessage(ErrorMessage notification) {
LOGGER.debug("Error message received");
-
+
}
@Override
public void onExperimenterMessage(ExperimenterMessage notification) {
LOGGER.debug("Experimenter message received");
-
+
}
@Override
public void onFlowRemovedMessage(FlowRemovedMessage notification) {
LOGGER.debug("FlowRemoved message received");
-
+
}
@Override
}).start();
}
-
+
protected void getSwitchFeatures() {
GetFeaturesInputBuilder featuresBuilder = new GetFeaturesInputBuilder();
featuresBuilder.setVersion((short) 4);
Future<Boolean> disconnect = adapter.disconnect();
disconnect.get();
LOGGER.debug("MockPlugin.shutdown() Disconnected");
- }
+ }
} catch (Exception e) {
LOGGER.error("MockPlugin.shutdown() exception caught: ", e.getMessage(), e);
}
@Override
public void onMultipartReplyMessage(MultipartReplyMessage notification) {
LOGGER.debug("MultipartReply message received");
-
+
}
@Override
@Override
public void onPortStatusMessage(PortStatusMessage notification) {
LOGGER.debug("MockPlugin.onPortStatusMessage() message received");
-
+
}
@Override
public int getIdleCounter() {
return idleCounter;
}
-
+
@Override
public void onConnectionReady() {
LOGGER.trace("MockPlugin().onConnectionReady()");