Class List Method List File List

# Class: VertxWeb::CSRFHandler

Inherits:
  Object
  - Object
  - VertxWeb::CSRFHandler
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb

## Class Method Summary (collapse)

- + (Object) create(secret = nil)

## Instance Method Summary (collapse)

- - (Object) handle(arg0 = nil)
- - (CSRFHandler) initialize(j_del) constructor
  A new instance of CSRFHandler.
- - (Object) j_del
- - (Object) set_cookie_name(name = nil)
- - (Object) set_header_name(name = nil)
- - (Object) set_nag_https(nag = nil)
- - (Object) set_timeout(timeout = nil)

## Constructor Details

### - (`CSRFHandler`) initialize(j_del)

Returns a new instance of CSRFHandler

    14
    15
    16
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 14

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(secret = nil)

Raises:

- (`ArgumentError`)

    37
    38
    39
    40
    41
    42
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 37

    def self.create(secret=nil)
      if secret.class == String && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::CSRFHandler.java_method(:create, [Java::java.lang.String.java_class]).call(secret),::VertxWeb::CSRFHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(secret)"
    end

## Instance Method Details

### - (`Object`) handle(arg0 = nil)

Raises:

- (`ArgumentError`)

    24
    25
    26
    27
    28
    29
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 24

    def handle(arg0=nil)
      if arg0.class.method_defined?(:j_del) && !block_given?
        return @j_del.java_method(:handle, [Java::IoVertxExtWeb::RoutingContext.java_class]).call(arg0.j_del)
      end
      raise ArgumentError, "Invalid arguments when calling handle(arg0)"
    end

### - (`Object`) j_del

    19
    20
    21
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 19

    def j_del
      @j_del
    end

### - (`Object`) set_cookie_name(name = nil)

Raises:

- (`ArgumentError`)

    47
    48
    49
    50
    51
    52
    53
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 47

    def set_cookie_name(name=nil)
      if name.class == String && !block_given?
        @j_del.java_method(:setCookieName, [Java::java.lang.String.java_class]).call(name)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_cookie_name(name)"
    end

### - (`Object`) set_header_name(name = nil)

Raises:

- (`ArgumentError`)

    58
    59
    60
    61
    62
    63
    64
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 58

    def set_header_name(name=nil)
      if name.class == String && !block_given?
        @j_del.java_method(:setHeaderName, [Java::java.lang.String.java_class]).call(name)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_header_name(name)"
    end

### - (`Object`) set_nag_https(nag = nil)

Raises:

- (`ArgumentError`)

    68
    69
    70
    71
    72
    73
    74
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 68

    def set_nag_https(nag=nil)
      if (nag.class == TrueClass || nag.class == FalseClass) && !block_given?
        @j_del.java_method(:setNagHttps, [Java::boolean.java_class]).call(nag)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_nag_https(nag)"
    end

### - (`Object`) set_timeout(timeout = nil)

Raises:

- (`ArgumentError`)

    78
    79
    80
    81
    82
    83
    84
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/csrf_handler.rb', line 78

    def set_timeout(timeout=nil)
      if timeout.class == Fixnum && !block_given?
        @j_del.java_method(:setTimeout, [Java::long.java_class]).call(timeout)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_timeout(timeout)"
    end