/** * Unblocks the specified endpoint. * * @param address The address to unblock */ public void unblock(InetAddress address) { if (address == null) { throw new IllegalArgumentException("Adress to unblock can not be null"); } unblock(new Subnet(address, 32)); }
/** * Blocks the specified endpoint. * * @param address The address to block */ public void block(InetAddress address) { if (address == null) { throw new IllegalArgumentException("Adress to block can not be null"); } block(new Subnet(address, 32)); }
/** * Blocks the specified endpoint. */ public void block(InetAddress address) { if (address == null) { throw new NullPointerException("Adress to block can not be null"); } block(new Subnet(address, 32)); }
/** * Unblocks the specified endpoint. */ public void unblock(InetAddress address) { if (address == null) { throw new NullPointerException("Adress to unblock can not be null"); } unblock(new Subnet(address, 32)); }
/** * Blocks the specified endpoint. * * @param address The address to block */ public void block(InetAddress address) { if (address == null) { throw new IllegalArgumentException("Adress to block can not be null"); } block(new Subnet(address, 32)); }
/** * Unblocks the specified endpoint. * * @param address The address to unblock */ public void unblock(InetAddress address) { if (address == null) { throw new IllegalArgumentException("Adress to unblock can not be null"); } unblock(new Subnet(address, 32)); }
/** * Creates a SessionFilter that blacklists the given IP addresses and/or * Subnets. * * @param blockedAddresses * the addresses to block * @param blockedSubnets * the subnets to block * @return a SessionFilter that blacklists the given IP addresses and/or * Subnets. */ private static SessionFilter createBlackListFilter( List<InetAddress> blockedAddresses, List<Subnet> blockedSubnets) { if (blockedAddresses == null && blockedSubnets == null) { return null; } // Initialize the IP filter with Deny type RemoteIpFilter ipFilter = new RemoteIpFilter(IpFilterType.DENY); if (blockedSubnets != null) { ipFilter.addAll(blockedSubnets); } if (blockedAddresses != null) { for (InetAddress address : blockedAddresses) { ipFilter.add(new Subnet(address, 32)); } } return ipFilter; }