Class List Method List File List

# Class: VertxWeb::SessionHandler

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

## Class Method Summary (collapse)

- + (Object) create(sessionStore = nil)

## Instance Method Summary (collapse)

- - (Object) handle(arg0 = nil)
- - (SessionHandler) initialize(j_del) constructor
  A new instance of SessionHandler.
- - (Object) j_del
- - (Object) set_cookie_http_only_flag(httpOnly = nil)
- - (Object) set_cookie_secure_flag(secure = nil)
- - (Object) set_nag_https(nag = nil)
- - (Object) set_session_cookie_name(sessionCookieName = nil)
- - (Object) set_session_timeout(timeout = nil)

## Constructor Details

### - (`SessionHandler`) initialize(j_del)

Returns a new instance of SessionHandler

    17
    18
    19
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/session_handler.rb', line 17

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

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

Raises:

- (`ArgumentError`)

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

    def self.create(sessionStore=nil)
      if sessionStore.class.method_defined?(:j_del) && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebHandler::SessionHandler.java_method(:create, [Java::IoVertxExtWebSstore::SessionStore.java_class]).call(sessionStore.j_del),::VertxWeb::SessionHandler)
      end
      raise ArgumentError, "Invalid arguments when calling create(sessionStore)"
    end

## Instance Method Details

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

Raises:

- (`ArgumentError`)

    27
    28
    29
    30
    31
    32
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/session_handler.rb', line 27

    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

    22
    23
    24
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/session_handler.rb', line 22

    def j_del
      @j_del
    end

### - (`Object`) set_cookie_http_only_flag(httpOnly = nil)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) set_cookie_secure_flag(secure = nil)

Raises:

- (`ArgumentError`)

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

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

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

Raises:

- (`ArgumentError`)

    56
    57
    58
    59
    60
    61
    62
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/session_handler.rb', line 56

    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_session_cookie_name(sessionCookieName = nil)

Raises:

- (`ArgumentError`)

    88
    89
    90
    91
    92
    93
    94
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/session_handler.rb', line 88

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

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

Raises:

- (`ArgumentError`)

    45
    46
    47
    48
    49
    50
    51
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/session_handler.rb', line 45

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