@Test public void testOnPortStatusMessage() { Class clazz = PortStatusMessage.class; Mockito.when(portStatus.getImplementedInterface()).thenReturn(clazz); registry.registerConnectionAdapter(switchConnection, features); messageListener.onPortStatusMessage(portStatus); Mockito.verify(shimRelay).sendOpenFlowMessageToCore(connector, portStatus, portStatus.getVersion(), portStatus.getXid(), 1L, 0); }
@Override public void onPortStatusMessage(PortStatusMessage arg0) { if (connectionRegistry.getFeaturesOutput(switchConnection) != null) { BigInteger datapathId = this.connectionRegistry.getDatapathID(this.switchConnection); initSession(connectionRegistry.getFeaturesOutput(switchConnection)); sendNotification(arg0, arg0.getImplementedInterface().getName()); shimRelay.sendOpenFlowMessageToCore(coreConnector, arg0, arg0.getVersion(), arg0.getXid(), datapathId.longValue(), 0); } }
ShimMessageListener implements OpenflowProtocolListener, SystemNotificationsListener, ConnectionReadyListener { @Override public void onPortStatusMessage(PortStatusMessage arg0) { if (connectionRegistry.getFeaturesOutput(switchConnection) != null) { BigInteger datapathId = this.connectionRegistry.getDatapathID(this.switchConnection); initSession(connectionRegistry.getFeaturesOutput(switchConnection)); sendNotification(arg0, arg0.getImplementedInterface().getName()); shimRelay.sendOpenFlowMessageToCore(coreConnector, arg0, arg0.getVersion(), arg0.getXid(), datapathId.longValue(), 0); } } }
ShimMessageListener implements OpenflowProtocolListener, SystemNotificationsListener, ConnectionReadyListener { @Override public void onPortStatusMessage(PortStatusMessage arg0) { if (connectionRegistry.getFeaturesOutput(switchConnection) != null) { BigInteger datapathId = this.connectionRegistry.getDatapathID(this.switchConnection); initSession(connectionRegistry.getFeaturesOutput(switchConnection)); sendNotification(arg0, arg0.getImplementedInterface().getName()); shimRelay.sendOpenFlowMessageToCore(coreConnector, arg0, arg0.getVersion(), arg0.getXid(), datapathId.longValue(), 0); } } ShimMessageListener(ZeroMQBaseConnector connector, ConnectionAdapter switchConnection, ShimRelay _shimRelay,
            ShimSwitchConnectionHandlerImpl handler, NotificationPublishService _notificationProviderService); }
ShimMessageListener implements OpenflowProtocolListener, SystemNotificationsListener, ConnectionReadyListener { @Override public void onPortStatusMessage(PortStatusMessage arg0) { if (connectionRegistry.getFeaturesOutput(switchConnection) != null) { BigInteger datapathId = this.connectionRegistry.getDatapathID(this.switchConnection); initSession(connectionRegistry.getFeaturesOutput(switchConnection)); sendNotification(arg0, arg0.getImplementedInterface().getName()); shimRelay.sendOpenFlowMessageToCore(coreConnector, arg0, arg0.getVersion(), arg0.getXid(), datapathId.longValue(), 0); } } ShimMessageListener(ZeroMQBaseConnector connector, ConnectionAdapter switchConnection, ShimRelay _shimRelay,
            ShimSwitchConnectionHandlerImpl handler, NotificationPublishService _notificationProviderService); void initSession(GetFeaturesOutput featuresOutput); void addMessageTranslator(final Class<? extends DataObject> messageType, final int version,
            final IMDMessageTranslator<OfHeader, List<DataObject>> translator); void registerConnectionAdaptersRegistry(ConnectionAdaptersRegistry connectionRegistry); void registerHandshakeListener(IHandshakeListener listener); @Override void onEchoRequestMessage(EchoRequestMessage arg0); @Override void onErrorMessage(ErrorMessage arg0); @Override void onExperimenterMessage(ExperimenterMessage arg0); @Override void onFlowRemovedMessage(FlowRemovedMessage arg0); @Override void onHelloMessage(HelloMessage arg0); @Override void onMultipartReplyMessage(MultipartReplyMessage arg0); @Override void onPacketInMessage(PacketInMessage arg0); @Override void onPortStatusMessage(PortStatusMessage arg0); @Override void onDisconnectEvent(DisconnectEvent arg0); @Override void onSwitchIdleEvent(SwitchIdleEvent arg0); @Override void onConnectionReady(); }
ShimMessageListener implements OpenflowProtocolListener, SystemNotificationsListener, ConnectionReadyListener { @Override public void onPortStatusMessage(PortStatusMessage arg0) { if (connectionRegistry.getFeaturesOutput(switchConnection) != null) { BigInteger datapathId = this.connectionRegistry.getDatapathID(this.switchConnection); initSession(connectionRegistry.getFeaturesOutput(switchConnection)); sendNotification(arg0, arg0.getImplementedInterface().getName()); shimRelay.sendOpenFlowMessageToCore(coreConnector, arg0, arg0.getVersion(), arg0.getXid(), datapathId.longValue(), 0); } } ShimMessageListener(ZeroMQBaseConnector connector, ConnectionAdapter switchConnection, ShimRelay _shimRelay,
            ShimSwitchConnectionHandlerImpl handler, NotificationPublishService _notificationProviderService); void initSession(GetFeaturesOutput featuresOutput); void addMessageTranslator(final Class<? extends DataObject> messageType, final int version,
            final IMDMessageTranslator<OfHeader, List<DataObject>> translator); void registerConnectionAdaptersRegistry(ConnectionAdaptersRegistry connectionRegistry); void registerHandshakeListener(IHandshakeListener listener); @Override void onEchoRequestMessage(EchoRequestMessage arg0); @Override void onErrorMessage(ErrorMessage arg0); @Override void onExperimenterMessage(ExperimenterMessage arg0); @Override void onFlowRemovedMessage(FlowRemovedMessage arg0); @Override void onHelloMessage(HelloMessage arg0); @Override void onMultipartReplyMessage(MultipartReplyMessage arg0); @Override void onPacketInMessage(PacketInMessage arg0); @Override void onPortStatusMessage(PortStatusMessage arg0); @Override void onDisconnectEvent(DisconnectEvent arg0); @Override void onSwitchIdleEvent(SwitchIdleEvent arg0); @Override void onConnectionReady(); static final Long DEFAULT_XID; }