@Test public void testOnOpenFlowCoreMessage() { Mockito.doReturn(connectionAdapter).when(registry).getConnectionAdapter(1L); Mockito.doReturn((short) EncodeConstants.OF13_VERSION_ID).when(msg).readUnsignedByte(); connectionHandler.onOpenFlowCoreMessage(1L, msg, 0); Mockito.verify(shimRelay).sendToSwitch(connectionAdapter, msg, EncodeConstants.OF13_VERSION_ID, coreConnector, 1L, 0); }
@Override public void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId) { ConnectionAdapter conn = connectionRegistry.getConnectionAdapter(datapathId); if (conn != null) { short ofVersion = msg.readUnsignedByte(); shimRelay.sendToSwitch(conn, msg, ofVersion, coreConnector, datapathId, moduleId); } }
ShimSwitchConnectionHandlerImpl implements SwitchConnectionHandler, ICoreListener, IHandshakeListener { @Override public void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId) { ConnectionAdapter conn = connectionRegistry.getConnectionAdapter(datapathId); if (conn != null) { short ofVersion = msg.readUnsignedByte(); shimRelay.sendToSwitch(conn, msg, ofVersion, coreConnector, datapathId, moduleId); } } }
ShimSwitchConnectionHandlerImpl implements SwitchConnectionHandler, ICoreListener, IHandshakeListener { @Override public void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId) { ConnectionAdapter conn = connectionRegistry.getConnectionAdapter(datapathId); if (conn != null) { short ofVersion = msg.readUnsignedByte(); shimRelay.sendToSwitch(conn, msg, ofVersion, coreConnector, datapathId, moduleId); } } ShimSwitchConnectionHandlerImpl(ZeroMQBaseConnector connector,
            NotificationPublishService _notificationProviderService); }
ShimSwitchConnectionHandlerImpl implements SwitchConnectionHandler, ICoreListener, IHandshakeListener { @Override public void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId) { ConnectionAdapter conn = connectionRegistry.getConnectionAdapter(datapathId); if (conn != null) { short ofVersion = msg.readUnsignedByte(); shimRelay.sendToSwitch(conn, msg, ofVersion, coreConnector, datapathId, moduleId); } } ShimSwitchConnectionHandlerImpl(ZeroMQBaseConnector connector,
            NotificationPublishService _notificationProviderService); void setSwitchFeaturesUtil(SwitchFeaturesUtil featureUtil); void init(); ShimRelay createShimRelay(); ConnectionAdaptersRegistry createConnectionAdaptersRegistry(); @Override boolean accept(InetAddress arg0); @Override void onSwitchConnected(ConnectionAdapter connectionAdapter); void handshake(ConnectionAdapter connectionAdapter); @Override void onSwitchHelloMessage(long xid, Short version, ConnectionAdapter connectionAdapter); NodeUpdated nodeAdded(ConnectionAdapter connectionAdapter); static InstanceIdentifier<Node> identifierFromDatapathId(final BigInteger datapathId); static NodeKey nodeKeyFromDatapathId(final BigInteger datapathId); static NodeId nodeIdFromDatapathId(final BigInteger datapathId); byte getMaxOFSupportedProtocol(); List<Byte> getSupportedOFProtocols(); int getNumberOfSwitches(); Pair<Protocol, ProtocolVersions> getSupportedProtocol(); void setSupportedProtocol(byte version); @Override void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId); @Override void onHelloCoreMessage(List<Pair<Protocol, ProtocolVersions>> requestedProtocols, int moduleId); void collectGetFeaturesOuput(Future<RpcResult<GetFeaturesOutput>> switchReply,
            final ConnectionAdapter connectionAdapter); void sendGetFeaturesOuputToCore(final Short proposedVersion, final int moduleId,
            final ConnectionAdapter connectionAdapter); void sendGetFeaturesToSwitch(final Short proposedVersion, final Long xid,
            final ConnectionAdapter connectionAdapter); @Override void onSwitchDisconnected(ConnectionAdapter connectionAdapter); GetFeaturesOutput getFeaturesFromRegistry(ConnectionAdapter conn); }
ShimSwitchConnectionHandlerImpl implements SwitchConnectionHandler, ICoreListener, IHandshakeListener { @Override public void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId) { ConnectionAdapter conn = connectionRegistry.getConnectionAdapter(datapathId); if (conn != null) { short ofVersion = msg.readUnsignedByte(); shimRelay.sendToSwitch(conn, msg, ofVersion, coreConnector, datapathId, moduleId); } } ShimSwitchConnectionHandlerImpl(ZeroMQBaseConnector connector,
            NotificationPublishService _notificationProviderService); void setSwitchFeaturesUtil(SwitchFeaturesUtil featureUtil); void init(); ShimRelay createShimRelay(); ConnectionAdaptersRegistry createConnectionAdaptersRegistry(); @Override boolean accept(InetAddress arg0); @Override void onSwitchConnected(ConnectionAdapter connectionAdapter); void handshake(ConnectionAdapter connectionAdapter); @Override void onSwitchHelloMessage(long xid, Short version, ConnectionAdapter connectionAdapter); NodeUpdated nodeAdded(ConnectionAdapter connectionAdapter); static InstanceIdentifier<Node> identifierFromDatapathId(final BigInteger datapathId); static NodeKey nodeKeyFromDatapathId(final BigInteger datapathId); static NodeId nodeIdFromDatapathId(final BigInteger datapathId); byte getMaxOFSupportedProtocol(); List<Byte> getSupportedOFProtocols(); int getNumberOfSwitches(); Pair<Protocol, ProtocolVersions> getSupportedProtocol(); void setSupportedProtocol(byte version); @Override void onOpenFlowCoreMessage(Long datapathId, ByteBuf msg, int moduleId); @Override void onHelloCoreMessage(List<Pair<Protocol, ProtocolVersions>> requestedProtocols, int moduleId); void collectGetFeaturesOuput(Future<RpcResult<GetFeaturesOutput>> switchReply,
            final ConnectionAdapter connectionAdapter); void sendGetFeaturesOuputToCore(final Short proposedVersion, final int moduleId,
            final ConnectionAdapter connectionAdapter); void sendGetFeaturesToSwitch(final Short proposedVersion, final Long xid,
            final ConnectionAdapter connectionAdapter); @Override void onSwitchDisconnected(ConnectionAdapter connectionAdapter); GetFeaturesOutput getFeaturesFromRegistry(ConnectionAdapter conn); static final Long DEFAULT_XID; }