public class OriginHandler extends Object implements HttpHandler
Constructor and Description |
---|
OriginHandler() |
Modifier and Type | Method and Description |
---|---|
OriginHandler | addAllowedOrigin(String origin) |
OriginHandler | addAllowedOrigins(Collection<String> origins) |
OriginHandler | addAllowedOrigins(String... origins) |
OriginHandler | clearAllowedOrigins() |
Set<String> | getAllowedOrigins() |
HttpHandler | getNext() |
HttpHandler | getOriginFailedHandler() |
void | handleRequest(HttpServerExchange exchange) Handle the request. |
boolean | isRequireAllOrigins() |
boolean | isRequireOriginHeader() |
OriginHandler | setNext(HttpHandler next) |
OriginHandler | setOriginFailedHandler(HttpHandler originFailedHandler) |
OriginHandler | setRequireAllOrigins(boolean requireAllOrigins) |
OriginHandler | setRequireOriginHeader(boolean requireOriginHeader) |
public void handleRequest(HttpServerExchange exchange) throws Exception
HttpHandler
handleRequest
in interface HttpHandler
exchange
- the HTTP request/response exchangeException
public OriginHandler addAllowedOrigin(String origin)
public OriginHandler addAllowedOrigins(Collection<String> origins)
public OriginHandler addAllowedOrigins(String... origins)
public OriginHandler clearAllowedOrigins()
public boolean isRequireAllOrigins()
public OriginHandler setRequireAllOrigins(boolean requireAllOrigins)
public boolean isRequireOriginHeader()
public OriginHandler setRequireOriginHeader(boolean requireOriginHeader)
public HttpHandler getNext()
public OriginHandler setNext(HttpHandler next)
public HttpHandler getOriginFailedHandler()
public OriginHandler setOriginFailedHandler(HttpHandler originFailedHandler)
Copyright © 2017 JBoss by Red Hat. All rights reserved.