Class List Method List File List

# Class: VertxWebClient::Form

Inherits:
  Object
  - Object
  - VertxWebClient::Form
  show all
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb

## Constant Summary

@@j_api_type =

      Object.new

## Class Method Summary (collapse)

- + (Boolean) accept?(obj)
- + (::VertxWebClient::Form) create
- + (Object) j_api_type
- + (Object) j_class
- + (::VertxWebClient::Form) multipart
- + (Object) unwrap(obj)
- + (Object) wrap(obj)

## Instance Method Summary (collapse)

- - (self) add_all(map = nil)
  Adds all the entries from another MultiMap to this one.
- - (self) add_attr(name = nil, value = nil)
  Adds a new value with the specified name and value.
- - (self) add_file(name = nil, file = nil)
- - (::Vertx::ReadStream) bilto
- - (self) set(name = nil, value = nil)
  Sets a value under the specified name.
- - (self) set_all(map = nil)
  Cleans this instance.

## Class Method Details

### + (`Boolean`) accept?(obj)

Returns:

- (`Boolean`)

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

    def @@j_api_type.accept?(obj)
      obj.class == Form
    end

### + (`::VertxWebClient::Form`) create

Returns:

- (`::VertxWebClient::Form`)

Raises:

- (`ArgumentError`)

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

    def self.create
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxWebclient::Form.java_method(:create, []).call(), ::VertxWebClient::Form)
      end
      raise ArgumentError, "Invalid arguments when calling create()"
    end

### + (`Object`) j_api_type

    28
    29
    30
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 28

    def self.j_api_type
      @@j_api_type
    end

### + (`Object`) j_class

    31
    32
    33
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 31

    def self.j_class
      Java::IoVertxWebclient::Form.java_class
    end

### + (`::VertxWebClient::Form`) multipart

Returns:

- (`::VertxWebClient::Form`)

Raises:

- (`ArgumentError`)

    42
    43
    44
    45
    46
    47
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 42

    def self.multipart
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(Java::IoVertxWebclient::Form.java_method(:multipart, []).call(),::VertxWebClient::Form)
      end
      raise ArgumentError, "Invalid arguments when calling multipart()"
    end

### + (`Object`) unwrap(obj)

    25
    26
    27
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 25

    def @@j_api_type.unwrap(obj)
      obj.j_del
    end

### + (`Object`) wrap(obj)

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

    def @@j_api_type.wrap(obj)
      Form.new(obj)
    end

## Instance Method Details

### - (`self`) add_all(map = nil)

Adds all the entries from another MultiMap to this one

Parameters:

- map (`::Vertx::MultiMap`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    72
    73
    74
    75
    76
    77
    78
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 72

    def add_all(map=nil)
      if map.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:addAll, [Java::IoVertxCore::MultiMap.java_class]).call(map.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling add_all(#{map})"
    end

### - (`self`) add_attr(name = nil, value = nil)

Adds a new value with the specified name and value.

Parameters:

- name (`String`) (defaults to: `nil`) —
  The name
- value (`String`) (defaults to: `nil`) —
  The value being added

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    52
    53
    54
    55
    56
    57
    58
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 52

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

### - (`self`) add_file(name = nil, file = nil)

Parameters:

- name (`String`) (defaults to: `nil`)
- file (`::Vertx::ReadStream`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    62
    63
    64
    65
    66
    67
    68
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 62

    def add_file(name=nil,file=nil)
      if name.class == String && file.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:addFile, [Java::java.lang.String.java_class,Java::IoVertxCoreStreams::ReadStream.java_class]).call(name,file.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling add_file(#{name},#{file})"
    end

### - (`::Vertx::ReadStream`) bilto

Returns:

- (`::Vertx::ReadStream`)

Raises:

- (`ArgumentError`)

    103
    104
    105
    106
    107
    108
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 103

    def bilto
      if !block_given?
        return ::Vertx::Util::Utils.safe_create(@j_del.java_method(:bilto, []).call(),::Vertx::ReadStreamImpl,::Vertx::Buffer.j_api_type)
      end
      raise ArgumentError, "Invalid arguments when calling bilto()"
    end

### - (`self`) set(name = nil, value = nil)

Sets a value under the specified name.

If there is an existing header with the same name, it is removed.

Parameters:

- name (`String`) (defaults to: `nil`) —
  The name
- value (`String`) (defaults to: `nil`) —
  The value

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

    85
    86
    87
    88
    89
    90
    91
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx-web-client/form.rb', line 85

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

### - (`self`) set_all(map = nil)

Cleans this instance.

Parameters:

- map (`::Vertx::MultiMap`) (defaults to: `nil`)

Returns:

- (`self`)

Raises:

- (`ArgumentError`)

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

    def set_all(map=nil)
      if map.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:setAll, [Java::IoVertxCore::MultiMap.java_class]).call(map.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling set_all(#{map})"
    end