Package io.vertx.mutiny.ext.web.handler
Class CorsHandler
- java.lang.Object
 - 
- io.vertx.mutiny.ext.web.handler.CorsHandler
 
 
- 
- All Implemented Interfaces:
 io.vertx.core.Handler<RoutingContext>,Consumer<RoutingContext>
public class CorsHandler extends Object implements io.vertx.core.Handler<RoutingContext>, Consumer<RoutingContext>
A handler which implements server side http://www.w3.org/TR/cors/[CORS] support for Vert.x-Web. NOTE: This class has been automatically generated from theoriginalnon Mutiny-ified interface using Vert.x codegen. 
- 
- 
Field Summary
Fields Modifier and Type Field Description static TypeArg<CorsHandler>__TYPE_ARG 
- 
Constructor Summary
Constructors Constructor Description CorsHandler(io.vertx.ext.web.handler.CorsHandler delegate)CorsHandler(Object delegate) 
- 
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(RoutingContext item)CorsHandleraddOrigin(String origin)CorsHandleraddOrigins(List<String> origins)CorsHandlerallowCredentials(boolean allow)CorsHandlerallowedHeader(String headerName)CorsHandlerallowedHeaders(Set<String> headerNames)CorsHandlerallowedMethod(io.vertx.core.http.HttpMethod method)CorsHandlerallowedMethods(Set<io.vertx.core.http.HttpMethod> methods)static CorsHandlercreate()static CorsHandlercreate(String allowedOriginPattern)booleanequals(Object o)CorsHandlerexposedHeader(String headerName)CorsHandlerexposedHeaders(Set<String> headerNames)io.vertx.ext.web.handler.CorsHandlergetDelegate()voidhandle(RoutingContext arg0)inthashCode()CorsHandlermaxAgeSeconds(int maxAgeSeconds)static CorsHandlernewInstance(io.vertx.ext.web.handler.CorsHandler arg)StringtoString() 
 - 
 
- 
- 
Field Detail
- 
__TYPE_ARG
public static final TypeArg<CorsHandler> __TYPE_ARG
 
 - 
 
- 
Constructor Detail
- 
CorsHandler
public CorsHandler(io.vertx.ext.web.handler.CorsHandler delegate)
 
- 
CorsHandler
public CorsHandler(Object delegate)
 
 - 
 
- 
Method Detail
- 
getDelegate
public io.vertx.ext.web.handler.CorsHandler getDelegate()
 
- 
handle
public void handle(RoutingContext arg0)
- Specified by:
 handlein interfaceio.vertx.core.Handler<RoutingContext>
 
- 
create
public static CorsHandler create(String allowedOriginPattern)
- Parameters:
 allowedOriginPattern- the allowed origin pattern- Returns:
 - the handler
 
 
- 
create
public static CorsHandler create()
- Returns:
 - the handler
 
 
- 
addOrigin
public CorsHandler addOrigin(String origin)
- Parameters:
 origin- the well formatted static origin- Returns:
 - self
 
 
- 
addOrigins
public CorsHandler addOrigins(List<String> origins)
- Parameters:
 origins- the well formatted static origin list- Returns:
 - self
 
 
- 
allowedMethod
public CorsHandler allowedMethod(io.vertx.core.http.HttpMethod method)
- Parameters:
 method- the method to add- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
allowedMethods
public CorsHandler allowedMethods(Set<io.vertx.core.http.HttpMethod> methods)
- Parameters:
 methods- the methods to add- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
allowedHeader
public CorsHandler allowedHeader(String headerName)
- Parameters:
 headerName- the allowed header name- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
allowedHeaders
public CorsHandler allowedHeaders(Set<String> headerNames)
- Parameters:
 headerNames- the allowed header names- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
exposedHeader
public CorsHandler exposedHeader(String headerName)
- Parameters:
 headerName- the exposed header name- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
exposedHeaders
public CorsHandler exposedHeaders(Set<String> headerNames)
- Parameters:
 headerNames- the exposed header names- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
allowCredentials
public CorsHandler allowCredentials(boolean allow)
- Parameters:
 allow- true if allowed- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
maxAgeSeconds
public CorsHandler maxAgeSeconds(int maxAgeSeconds)
- Parameters:
 maxAgeSeconds- max age in seconds- Returns:
 - a reference to this, so the API can be used fluently
 
 
- 
accept
public void accept(RoutingContext item)
- Specified by:
 acceptin interfaceConsumer<RoutingContext>
 
- 
newInstance
public static CorsHandler newInstance(io.vertx.ext.web.handler.CorsHandler arg)
 
 - 
 
 -