Class List Method List File List

# Class: VertxWeb::LocalSessionStore

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

## Class Method Summary (collapse)

- + (Object) create(vertx = nil, sessionMapName = nil, reaperInterval = nil)

## Instance Method Summary (collapse)

- - (Object) clear
- - (Object) close
- - (Object) create_session(timeout = nil)
- - (Object) delete(id = nil)
- - (Object) get(id = nil)
- - (LocalSessionStore) initialize(j_del) constructor
  A new instance of LocalSessionStore.
- - (Object) j_del
- - (Object) put(session = nil)
- - (Object) retry_timeout
- - (Object) size

## Constructor Details

### - (`LocalSessionStore`) initialize(j_del)

Returns a new instance of LocalSessionStore

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

    def initialize(j_del)
      super(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) create(vertx = nil, sessionMapName = nil, reaperInterval = nil)

Raises:

- (`ArgumentError`)

    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/local_session_store.rb', line 102

    def self.create(vertx=nil,sessionMapName=nil,reaperInterval=nil)
      if vertx.class.method_defined?(:j_del) && !block_given? && sessionMapName == nil && reaperInterval == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebSstore::LocalSessionStore.java_method(:create, [Java::IoVertxCore::Vertx.java_class]).call(vertx.j_del),::VertxWeb::LocalSessionStore)
      elsif vertx.class.method_defined?(:j_del) && sessionMapName.class == String && !block_given? && reaperInterval == nil
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebSstore::LocalSessionStore.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class]).call(vertx.j_del,sessionMapName),::VertxWeb::LocalSessionStore)
      elsif vertx.class.method_defined?(:j_del) && sessionMapName.class == String && reaperInterval.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxExtWebSstore::LocalSessionStore.java_method(:create, [Java::IoVertxCore::Vertx.java_class,Java::java.lang.String.java_class,Java::long.java_class]).call(vertx.j_del,sessionMapName,reaperInterval),::VertxWeb::LocalSessionStore)
      end
      raise ArgumentError, "Invalid arguments when calling create(vertx,sessionMapName,reaperInterval)"
    end

## Instance Method Details

### - (`Object`) clear

Raises:

- (`ArgumentError`)

    74
    75
    76
    77
    78
    79
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/local_session_store.rb', line 74

    def clear
      if block_given?
        return @j_del.java_method(:clear, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling clear()"
    end

### - (`Object`) close

Raises:

- (`ArgumentError`)

    91
    92
    93
    94
    95
    96
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/local_session_store.rb', line 91

    def close
      if !block_given?
        return @j_del.java_method(:close, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling close()"
    end

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

Raises:

- (`ArgumentError`)

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

    def create_session(timeout=nil)
      if timeout.class == Fixnum && !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:createSession, [Java::long.java_class]).call(timeout),::VertxWeb::Session)
      end
      raise ArgumentError, "Invalid arguments when calling create_session(timeout)"
    end

### - (`Object`) delete(id = nil)

Raises:

- (`ArgumentError`)

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

    def delete(id=nil)
      if id.class == String && block_given?
        return @j_del.java_method(:delete, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling delete(id)"
    end

### - (`Object`) get(id = nil)

Raises:

- (`ArgumentError`)

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

    def get(id=nil)
      if id.class == String && block_given?
        return @j_del.java_method(:get, [Java::java.lang.String.java_class,Java::IoVertxCore::Handler.java_class]).call(id,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ::Vertx::Util::Utils.safe_create(ar.result,::VertxWeb::Session) : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling get(id)"
    end

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) put(session = nil)

Raises:

- (`ArgumentError`)

    65
    66
    67
    68
    69
    70
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/local_session_store.rb', line 65

    def put(session=nil)
      if session.class.method_defined?(:j_del) && block_given?
        return @j_del.java_method(:put, [Java::IoVertxExtWeb::Session.java_class,Java::IoVertxCore::Handler.java_class]).call(session.j_del,(Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling put(session)"
    end

### - (`Object`) retry_timeout

Raises:

- (`ArgumentError`)

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

    def retry_timeout
      if !block_given?
        return @j_del.java_method(:retryTimeout, []).call()
      end
      raise ArgumentError, "Invalid arguments when calling retry_timeout()"
    end

### - (`Object`) size

Raises:

- (`ArgumentError`)

    83
    84
    85
    86
    87
    88
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/local_session_store.rb', line 83

    def size
      if block_given?
        return @j_del.java_method(:size, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |ar| yield(ar.failed ? ar.cause : nil, ar.succeeded ? ar.result : nil) }))
      end
      raise ArgumentError, "Invalid arguments when calling size()"
    end