public class AccessControlListHandler extends Object implements HttpHandler
Modifier and Type | Class and Description |
---|---|
static class |
AccessControlListHandler.Builder |
Constructor and Description |
---|
AccessControlListHandler(ExchangeAttribute attribute) |
AccessControlListHandler(HttpHandler next,
ExchangeAttribute attribute) |
Modifier and Type | Method and Description |
---|---|
AccessControlListHandler |
addAllow(String pattern)
Adds an allowed user agent peer to the ACL list
|
AccessControlListHandler |
addDeny(String pattern)
Adds an denied user agent to the ACL list
|
AccessControlListHandler |
clearRules() |
HttpHandler |
getNext() |
void |
handleRequest(HttpServerExchange exchange)
Handle the request.
|
boolean |
isDefaultAllow() |
AccessControlListHandler |
setDefaultAllow(boolean defaultAllow) |
AccessControlListHandler |
setNext(HttpHandler next) |
public AccessControlListHandler(HttpHandler next, ExchangeAttribute attribute)
public AccessControlListHandler(ExchangeAttribute attribute)
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public boolean isDefaultAllow()
public AccessControlListHandler setDefaultAllow(boolean defaultAllow)
public HttpHandler getNext()
public AccessControlListHandler setNext(HttpHandler next)
public AccessControlListHandler addAllow(String pattern)
User agent may be given as regex
pattern
- The pattern to add to the ACLpublic AccessControlListHandler addDeny(String pattern)
User agent may be given as regex
pattern
- The user agent to add to the ACLpublic AccessControlListHandler clearRules()
Copyright © 2019 JBoss by Red Hat. All rights reserved.