@Test public void withoutRuleConfiguration() { RuleNode<AuthenticationConfiguration> initialRule = new RuleNode<>( new RuleNode<>( new RuleNode<>(null, MatchRule.ALL.matchPort(3456), config3), MatchRule.ALL.matchPort(2345), config2), MatchRule.ALL.matchPort(1234), config1); AuthenticationContext ctx = new AuthenticationContext(initialRule, null) .without(1); assertExpectedRuleNode(ctx.authRules, config1, MatchRule.ALL.matchPort(1234)); RuleNode<AuthenticationConfiguration> second = ctx.authRules.getNext(); assertExpectedRuleNode(second, config3, MatchRule.ALL.matchPort(3456)); assertNull(second.getNext()); }
private static <T> RuleNode<T> without(RuleNode<T> node, int idx) { return node == null ? null : node.without(idx); }
AuthenticationContext implements Contextual<AuthenticationContext> { private static <T> RuleNode<T> without(RuleNode<T> node, int idx) { return node == null ? null : node.without(idx); } }
AuthenticationContext implements Contextual<AuthenticationContext> { private static <T> RuleNode<T> without(RuleNode<T> node, int idx) { return node == null ? null : node.without(idx); } private  AuthenticationContext();   AuthenticationContext(final RuleNode<AuthenticationConfiguration> authRules, final RuleNode<SecurityFactory<SSLContext>> sslRules); }
AuthenticationContext implements Contextual<AuthenticationContext> { private static <T> RuleNode<T> without(RuleNode<T> node, int idx) { return node == null ? null : node.without(idx); } private  AuthenticationContext();   AuthenticationContext(final RuleNode<AuthenticationConfiguration> authRules, final RuleNode<SecurityFactory<SSLContext>> sslRules); static AuthenticationContext empty(); static AuthenticationContext captureCurrent(); AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration); AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext); AuthenticationContext with(AuthenticationContext other); AuthenticationContext with(int idx, MatchRule rule, AuthenticationConfiguration configuration); AuthenticationContext withSsl(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext); AuthenticationContext replacing(int idx, MatchRule rule, AuthenticationConfiguration configuration); AuthenticationContext replacingSslContext(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext); AuthenticationContext without(int idx); AuthenticationContext withoutSsl(int idx); T run(PrivilegedAction<T> action); T run(PrivilegedExceptionAction<T> action); T run(P parameter, ParametricPrivilegedAction<T, P> action); T run(P parameter, ParametricPrivilegedExceptionAction<T, P> action); void runAsObjIntConsumer(ObjIntConsumer<T> action, T parameter1, int parameter2); T runAsSupplier(Supplier<T> action); void runAsObjIntConsumerEx(ExceptionObjIntConsumer<T, E> action, T parameter1, int parameter2); T runAsSupplierEx(ExceptionSupplier<T, E> action); ContextManager<AuthenticationContext> getInstanceContextManager(); static ContextManager<AuthenticationContext> getContextManager(); }
AuthenticationContext implements Contextual<AuthenticationContext> { private static <T> RuleNode<T> without(RuleNode<T> node, int idx) { return node == null ? null : node.without(idx); } private  AuthenticationContext();   AuthenticationContext(final RuleNode<AuthenticationConfiguration> authRules, final RuleNode<SecurityFactory<SSLContext>> sslRules); static AuthenticationContext empty(); static AuthenticationContext captureCurrent(); AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration); AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext); AuthenticationContext with(AuthenticationContext other); AuthenticationContext with(int idx, MatchRule rule, AuthenticationConfiguration configuration); AuthenticationContext withSsl(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext); AuthenticationContext replacing(int idx, MatchRule rule, AuthenticationConfiguration configuration); AuthenticationContext replacingSslContext(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext); AuthenticationContext without(int idx); AuthenticationContext withoutSsl(int idx); T run(PrivilegedAction<T> action); T run(PrivilegedExceptionAction<T> action); T run(P parameter, ParametricPrivilegedAction<T, P> action); T run(P parameter, ParametricPrivilegedExceptionAction<T, P> action); void runAsObjIntConsumer(ObjIntConsumer<T> action, T parameter1, int parameter2); T runAsSupplier(Supplier<T> action); void runAsObjIntConsumerEx(ExceptionObjIntConsumer<T, E> action, T parameter1, int parameter2); T runAsSupplierEx(ExceptionSupplier<T, E> action); ContextManager<AuthenticationContext> getInstanceContextManager(); static ContextManager<AuthenticationContext> getContextManager();  }