public class IPAddressAccessControlHandler extends Object implements HttpHandler
Modifier and Type | Class and Description |
---|---|
static class | IPAddressAccessControlHandler.Builder |
Constructor and Description |
---|
IPAddressAccessControlHandler() |
IPAddressAccessControlHandler(HttpHandler next) |
IPAddressAccessControlHandler(HttpHandler next, int denyResponseCode) |
Modifier and Type | Method and Description |
---|---|
IPAddressAccessControlHandler | addAllow(String peer) Adds an allowed peer to the ACL list |
IPAddressAccessControlHandler | addDeny(String peer) Adds an denied peer to the ACL list |
IPAddressAccessControlHandler | clearRules() |
int | getDenyResponseCode() |
HttpHandler | getNext() |
void | handleRequest(HttpServerExchange exchange) Handle the request. |
boolean | isDefaultAllow() |
IPAddressAccessControlHandler | setDefaultAllow(boolean defaultAllow) |
IPAddressAccessControlHandler | setNext(HttpHandler next) |
public IPAddressAccessControlHandler(HttpHandler next)
public IPAddressAccessControlHandler(HttpHandler next, int denyResponseCode)
public IPAddressAccessControlHandler()
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public int getDenyResponseCode()
public boolean isDefaultAllow()
public IPAddressAccessControlHandler setDefaultAllow(boolean defaultAllow)
public HttpHandler getNext()
public IPAddressAccessControlHandler setNext(HttpHandler next)
public IPAddressAccessControlHandler addAllow(String peer)
Peer can take several forms:
a.b.c.d = Literal IPv4 Address a:b:c:d:e:f:g:h = Literal IPv6 Address a.b.* = Wildcard IPv4 Address a:b:* = Wildcard IPv6 Address a.b.c.0/24 = Classless wildcard IPv4 address a:b:c:d:e:f:g:0/120 = Classless wildcard IPv4 address
peer
- The peer to add to the ACLpublic IPAddressAccessControlHandler addDeny(String peer)
Peer can take several forms:
a.b.c.d = Literal IPv4 Address a:b:c:d:e:f:g:h = Literal IPv6 Address a.b.* = Wildcard IPv4 Address a:b:* = Wildcard IPv6 Address a.b.c.0/24 = Classless wildcard IPv4 address a:b:c:d:e:f:g:0/120 = Classless wildcard IPv4 address
peer
- The peer to add to the ACLpublic IPAddressAccessControlHandler clearRules()
Copyright © 2015 JBoss by Red Hat. All rights reserved.