io.vertx.rxjava.ext.web.handler

## Class CorsHandler

- java.lang.Object
- - io.vertx.rxjava.ext.web.handler.CorsHandler

- All Implemented Interfaces:
    Handler<RoutingContext>

      public class CorsHandler
      extends Object
      implements Handler<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 the `original` non RX-ified interface using Vert.x codegen.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `CorsHandler(CorsHandler delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CorsHandler` | `allowCredentials(boolean allow)` Set whether credentials are allowed
    `CorsHandler` | `allowedHeader(String headerName)` Add an allowed header
    `CorsHandler` | `allowedHeaders(Set<String> headerNames)` Add a set of allowed headers
    `CorsHandler` | `allowedMethod(HttpMethod method)` Add an allowed method
    `static CorsHandler` | `create(String allowedOriginPattern)` Create a CORS handler
    `CorsHandler` | `exposedHeader(String headerName)` Add an exposed header
    `CorsHandler` | `exposedHeaders(Set<String> headerNames)` Add a set of exposed headers
    `Object` | `getDelegate()`
    `void` | `handle(RoutingContext arg0)` Something has happened, so handle it.
    `CorsHandler` | `maxAgeSeconds(int maxAgeSeconds)` Set how long the browser should cache the information
    `static CorsHandler` | `newInstance(CorsHandler arg)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CorsHandler

          public CorsHandler(CorsHandler delegate)

  - ### Method Detail

    - #### getDelegate

          public Object getDelegate()

    - #### handle

          public void handle(RoutingContext arg0)

      Description copied from interface: `Handler`
      Something has happened, so handle it.
      Specified by:
        `handle` in interface `Handler<RoutingContext>`
      Parameters:
        `arg0` - the event to handle

    - #### create

          public static CorsHandler create(String allowedOriginPattern)

      Create a CORS handler
      Parameters:
        `allowedOriginPattern` - the allowed origin pattern
      Returns:
        the handler

    - #### allowedMethod

          public CorsHandler allowedMethod(HttpMethod method)

      Add an allowed method
      Parameters:
        `method` - the method to add
      Returns:
        a reference to this, so the API can be used fluently

    - #### allowedHeader

          public CorsHandler allowedHeader(String headerName)

      Add an allowed header
      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)

      Add a set of allowed headers
      Parameters:
        `headerNames` - the allowed header names
      Returns:
        a reference to this, so the API can be used fluently

    - #### exposedHeader

          public CorsHandler exposedHeader(String headerName)

      Add an exposed header
      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)

      Add a set of exposed headers
      Parameters:
        `headerNames` - the exposed header names
      Returns:
        a reference to this, so the API can be used fluently

    - #### allowCredentials

          public CorsHandler allowCredentials(boolean allow)

      Set whether credentials are allowed
      Parameters:
        `allow` - true if allowed
      Returns:
        a reference to this, so the API can be used fluently

    - #### maxAgeSeconds

          public CorsHandler maxAgeSeconds(int maxAgeSeconds)

      Set how long the browser should cache the information
      Parameters:
        `maxAgeSeconds` - max age in seconds
      Returns:
        a reference to this, so the API can be used fluently

    - #### newInstance

          public static CorsHandler newInstance(CorsHandler arg)

Copyright © 2016. All rights reserved.