Class List Method List File List

# Class: VertxWeb::Cookie

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

## Class Method Summary (collapse)

- + (Object) cookie(name = nil, value = nil)

## Instance Method Summary (collapse)

- - (Boolean) changed?
- - (Object) encode
- - (Object) get_domain
- - (Object) get_name
- - (Object) get_path
- - (Object) get_value
- - (Cookie) initialize(j_del) constructor
  A new instance of Cookie.
- - (Object) j_del
- - (Object) set_changed(changed = nil)
- - (Object) set_domain(domain = nil)
- - (Object) set_http_only(httpOnly = nil)
- - (Object) set_max_age(maxAge = nil)
- - (Object) set_path(path = nil)
- - (Object) set_secure(secure = nil)
- - (Object) set_value(value = nil)

## Constructor Details

### - (`Cookie`) initialize(j_del)

Returns a new instance of Cookie

    12
    13
    14
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 12

    def initialize(j_del)
      @j_del = j_del
    end

## Class Method Details

### + (`Object`) cookie(name = nil, value = nil)

Raises:

- (`ArgumentError`)

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

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

## Instance Method Details

### - (`Boolean`) changed?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    137
    138
    139
    140
    141
    142
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 137

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

### - (`Object`) encode

Raises:

- (`ArgumentError`)

    129
    130
    131
    132
    133
    134
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 129

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

### - (`Object`) get_domain

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) get_name

Raises:

- (`ArgumentError`)

    31
    32
    33
    34
    35
    36
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 31

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

### - (`Object`) get_path

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) get_value

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) j_del

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

    def j_del
      @j_del
    end

### - (`Object`) set_changed(changed = nil)

Raises:

- (`ArgumentError`)

    147
    148
    149
    150
    151
    152
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 147

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

### - (`Object`) set_domain(domain = nil)

Raises:

- (`ArgumentError`)

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

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

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

Raises:

- (`ArgumentError`)

    120
    121
    122
    123
    124
    125
    126
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 120

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

### - (`Object`) set_max_age(maxAge = nil)

Raises:

- (`ArgumentError`)

    96
    97
    98
    99
    100
    101
    102
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 96

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

### - (`Object`) set_path(path = nil)

Raises:

- (`ArgumentError`)

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

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

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

Raises:

- (`ArgumentError`)

    106
    107
    108
    109
    110
    111
    112
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web/cookie.rb', line 106

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

### - (`Object`) set_value(value = nil)

Raises:

- (`ArgumentError`)

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

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