HttpHandler
public class AccessControlListHandler extends java.lang.Object implements HttpHandler
Modifier and Type | Class | Description |
---|---|---|
static class |
AccessControlListHandler.Builder |
Constructor | Description |
---|---|
AccessControlListHandler(ExchangeAttribute attribute) |
|
AccessControlListHandler(HttpHandler next,
ExchangeAttribute attribute) |
Modifier and Type | Method | Description |
---|---|---|
AccessControlListHandler |
addAllow(java.lang.String pattern) |
Adds an allowed user agent peer to the ACL list
|
AccessControlListHandler |
addDeny(java.lang.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 java.lang.Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangejava.lang.Exception
public boolean isDefaultAllow()
public AccessControlListHandler setDefaultAllow(boolean defaultAllow)
public HttpHandler getNext()
public AccessControlListHandler setNext(HttpHandler next)
public AccessControlListHandler addAllow(java.lang.String pattern)
User agent may be given as regex
pattern
- The pattern to add to the ACLpublic AccessControlListHandler addDeny(java.lang.String pattern)
User agent may be given as regex
pattern
- The user agent to add to the ACLpublic AccessControlListHandler clearRules()
Copyright © 2018. All rights reserved.