@Test(expected = UpdateMessageCompositionException.class) public void testOnUpdateMessageIllegalSqt() throws Exception { MasterDatabaseBinding binding = new MasterDatabaseBindingBuilder() .setIpPrefix(new IpPrefix(new Ipv4Prefix("10.10.10.10/24"))) .setSecurityGroupTag(new Sgt(1)) .setOrigin(BindingOriginsConfig.NETWORK_ORIGIN) .setPeerSequence(new PeerSequenceBuilder().setPeer(Collections.emptyList()).build()) .build(); sxpv4.onUpdateMessage(connection, Collections.emptyList(), Collections.singletonList(binding), null); }
@Override public <T extends SxpBindingFields> ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings, List<T> addBindings, SxpBindingFilter bindingFilter) throws UpdateMessageCompositionException { try { return MessageFactory.createUpdate(deleteBindings, addBindings, ownerNode.getNodeId(), connection.getCapabilitiesRemote(), bindingFilter); } catch (SecurityGroupTagValueException | AttributeVariantException e) { throw new UpdateMessageCompositionException(connection.getVersion(), false, e); } }
Sxpv4 extends AbstractStrategy { @Override public <T extends SxpBindingFields> ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings, List<T> addBindings, SxpBindingFilter bindingFilter) throws UpdateMessageCompositionException { try { return MessageFactory.createUpdate(deleteBindings, addBindings, ownerNode.getNodeId(), connection.getCapabilitiesRemote(), bindingFilter); } catch (SecurityGroupTagValueException | AttributeVariantException e) { throw new UpdateMessageCompositionException(connection.getVersion(), false, e); } } }
Sxpv4 extends AbstractStrategy { @Override public <T extends SxpBindingFields> ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings, List<T> addBindings, SxpBindingFilter bindingFilter) throws UpdateMessageCompositionException { try { return MessageFactory.createUpdate(deleteBindings, addBindings, ownerNode.getNodeId(), connection.getCapabilitiesRemote(), bindingFilter); } catch (SecurityGroupTagValueException | AttributeVariantException e) { throw new UpdateMessageCompositionException(connection.getVersion(), false, e); } } Sxpv4(SxpNode ownerNode); }
Sxpv4 extends AbstractStrategy { @Override public <T extends SxpBindingFields> ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings, List<T> addBindings, SxpBindingFilter bindingFilter) throws UpdateMessageCompositionException { try { return MessageFactory.createUpdate(deleteBindings, addBindings, ownerNode.getNodeId(), connection.getCapabilitiesRemote(), bindingFilter); } catch (SecurityGroupTagValueException | AttributeVariantException e) { throw new UpdateMessageCompositionException(connection.getVersion(), false, e); } } Sxpv4(SxpNode ownerNode); @Override void onChannelActivation(final ChannelHandlerContext ctx, SxpConnection connection); @Override void onInputMessage(ChannelHandlerContext ctx, SxpConnection connection, Notification message); @Override Notification onParseInput(ByteBuf request); @Override ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings,
            List<T> addBindings, SxpBindingFilter bindingFilter); }
Sxpv4 extends AbstractStrategy { @Override public <T extends SxpBindingFields> ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings, List<T> addBindings, SxpBindingFilter bindingFilter) throws UpdateMessageCompositionException { try { return MessageFactory.createUpdate(deleteBindings, addBindings, ownerNode.getNodeId(), connection.getCapabilitiesRemote(), bindingFilter); } catch (SecurityGroupTagValueException | AttributeVariantException e) { throw new UpdateMessageCompositionException(connection.getVersion(), false, e); } } Sxpv4(SxpNode ownerNode); @Override void onChannelActivation(final ChannelHandlerContext ctx, SxpConnection connection); @Override void onInputMessage(ChannelHandlerContext ctx, SxpConnection connection, Notification message); @Override Notification onParseInput(ByteBuf request); @Override ByteBuf onUpdateMessage(SxpConnection connection, List<T> deleteBindings,
            List<T> addBindings, SxpBindingFilter bindingFilter);  }