Class List Method List File List

# Class: Vertx::HttpClientRequest

Inherits:
  Object
  - Object
  - Vertx::HttpClientRequest
  show all
Includes:
  ReadStream, WriteStream
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb

## Instance Method Summary (collapse)

- - (Boolean) chunked?
- - (Object) connection
- - (Object) connection_handler
- - (Object) continue_handler
- - (Object) drain_handler
- - (Object) end(param_1 = nil, param_2 = nil)
- - (Object) end_handler
- - (Object) exception_handler
- - (Object) get_host
- - (Object) get_raw_method
- - (Object) handler
- - (Object) headers
- - (HttpClientRequest) initialize(j_del) constructor
  A new instance of HttpClientRequest.
- - (Object) j_del
- - (Object) method
- - (Object) path
- - (Object) pause
- - (Object) push_handler
- - (Object) put_header(name = nil, value = nil)
- - (Object) query
- - (Object) reset(code = nil)
- - (Object) resume
- - (Object) send_head
- - (Object) set_chunked(chunked = nil)
- - (Object) set_host(host = nil)
- - (Object) set_raw_method(method = nil)
- - (Object) set_timeout(timeoutMs = nil)
- - (Object) set_write_queue_max_size(maxSize = nil)
- - (Object) stream_id
- - (Object) uri
- - (Object) write(param_1 = nil, param_2 = nil)
- - (Object) write_custom_frame(param_1 = nil, param_2 = nil, param_3 = nil)
- - (Boolean) write_queue_full?

## Constructor Details

### - (`HttpClientRequest`) initialize(j_del)

Returns a new instance of HttpClientRequest

    41
    42
    43
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 41

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Boolean`) chunked?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    151
    152
    153
    154
    155
    156
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 151

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

### - (`Object`) connection

Raises:

- (`ArgumentError`)

    346
    347
    348
    349
    350
    351
    352
    353
    354
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 346

    def connection
      if !block_given?
        if @cached_connection != nil
          return @cached_connection
        end
        return @cached_connection = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:connection, []).call(),::Vertx::HttpConnection)
      end
      raise ArgumentError, "Invalid arguments when calling connection()"
    end

### - (`Object`) connection_handler

Raises:

- (`ArgumentError`)

    358
    359
    360
    361
    362
    363
    364
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 358

    def connection_handler
      if block_given?
        @j_del.java_method(:connectionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::HttpConnection)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling connection_handler()"
    end

### - (`Object`) continue_handler

Raises:

- (`ArgumentError`)

    251
    252
    253
    254
    255
    256
    257
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 251

    def continue_handler
      if block_given?
        @j_del.java_method(:continueHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling continue_handler()"
    end

### - (`Object`) drain_handler

Raises:

- (`ArgumentError`)

    99
    100
    101
    102
    103
    104
    105
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 99

    def drain_handler
      if block_given?
        @j_del.java_method(:drainHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling drain_handler()"
    end

### - (`Object`) end(param_1 = nil, param_2 = nil)

Raises:

- (`ArgumentError`)

    282
    283
    284
    285
    286
    287
    288
    289
    290
    291
    292
    293
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 282

    def end(param_1=nil,param_2=nil)
      if !block_given? && param_1 == nil && param_2 == nil
        return @j_del.java_method(:end, []).call()
      elsif param_1.class == String && !block_given? && param_2 == nil
        return @j_del.java_method(:end, [Java::java.lang.String.java_class]).call(param_1)
      elsif param_1.class.method_defined?(:j_del) && !block_given? && param_2 == nil
        return @j_del.java_method(:end, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1.j_del)
      elsif param_1.class == String && param_2.class == String && !block_given?
        return @j_del.java_method(:end, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2)
      end
      raise ArgumentError, "Invalid arguments when calling end(param_1,param_2)"
    end

### - (`Object`) end_handler

Raises:

- (`ArgumentError`)

    133
    134
    135
    136
    137
    138
    139
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 133

    def end_handler
      if block_given?
        @j_del.java_method(:endHandler, [Java::IoVertxCore::Handler.java_class]).call(Proc.new { yield })
        return self
      end
      raise ArgumentError, "Invalid arguments when calling end_handler()"
    end

### - (`Object`) exception_handler

Raises:

- (`ArgumentError`)

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

    def exception_handler
      if block_given?
        @j_del.java_method(:exceptionHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.from_throwable(event)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling exception_handler()"
    end

### - (`Object`) get_host

Raises:

- (`ArgumentError`)

    216
    217
    218
    219
    220
    221
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 216

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

### - (`Object`) get_raw_method

Raises:

- (`ArgumentError`)

    166
    167
    168
    169
    170
    171
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 166

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

### - (`Object`) handler

Raises:

- (`ArgumentError`)

    108
    109
    110
    111
    112
    113
    114
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 108

    def handler
      if block_given?
        @j_del.java_method(:handler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::HttpClientResponse)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling handler()"
    end

### - (`Object`) headers

Raises:

- (`ArgumentError`)

    223
    224
    225
    226
    227
    228
    229
    230
    231
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 223

    def headers
      if !block_given?
        if @cached_headers != nil
          return @cached_headers
        end
        return @cached_headers = ::Vertx::Util::Utils.safe_create(@j_del.java_method(:headers, []).call(),::Vertx::MultiMap)
      end
      raise ArgumentError, "Invalid arguments when calling headers()"
    end

### - (`Object`) j_del

    46
    47
    48
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 46

    def j_del
      @j_del
    end

### - (`Object`) method

Raises:

- (`ArgumentError`)

    159
    160
    161
    162
    163
    164
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 159

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

### - (`Object`) path

Raises:

- (`ArgumentError`)

    190
    191
    192
    193
    194
    195
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 190

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

### - (`Object`) pause

Raises:

- (`ArgumentError`)

    116
    117
    118
    119
    120
    121
    122
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 116

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

### - (`Object`) push_handler

Raises:

- (`ArgumentError`)

    327
    328
    329
    330
    331
    332
    333
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 327

    def push_handler
      if block_given?
        @j_del.java_method(:pushHandler, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(::Vertx::Util::Utils.safe_create(event,::Vertx::HttpClientRequest)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling push_handler()"
    end

### - (`Object`) put_header(name = nil, value = nil)

Raises:

- (`ArgumentError`)

    236
    237
    238
    239
    240
    241
    242
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 236

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

### - (`Object`) query

Raises:

- (`ArgumentError`)

    197
    198
    199
    200
    201
    202
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 197

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

### - (`Object`) reset(code = nil)

Raises:

- (`ArgumentError`)

    337
    338
    339
    340
    341
    342
    343
    344
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 337

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

### - (`Object`) resume

Raises:

- (`ArgumentError`)

    124
    125
    126
    127
    128
    129
    130
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 124

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

### - (`Object`) send_head

Raises:

- (`ArgumentError`)

    262
    263
    264
    265
    266
    267
    268
    269
    270
    271
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 262

    def send_head
      if !block_given?
        @j_del.java_method(:sendHead, []).call()
        return self
      elsif block_given?
        @j_del.java_method(:sendHead, [Java::IoVertxCore::Handler.java_class]).call((Proc.new { |event| yield(event.name.intern) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling send_head()"
    end

### - (`Object`) set_chunked(chunked = nil)

Raises:

- (`ArgumentError`)

    143
    144
    145
    146
    147
    148
    149
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 143

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

### - (`Object`) set_host(host = nil)

Raises:

- (`ArgumentError`)

    208
    209
    210
    211
    212
    213
    214
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 208

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

### - (`Object`) set_raw_method(method = nil)

Raises:

- (`ArgumentError`)

    175
    176
    177
    178
    179
    180
    181
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 175

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

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

Raises:

- (`ArgumentError`)

    302
    303
    304
    305
    306
    307
    308
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 302

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

### - (`Object`) set_write_queue_max_size(maxSize = nil)

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) stream_id

Raises:

- (`ArgumentError`)

    389
    390
    391
    392
    393
    394
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 389

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

### - (`Object`) uri

Raises:

- (`ArgumentError`)

    183
    184
    185
    186
    187
    188
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 183

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

### - (`Object`) write(param_1 = nil, param_2 = nil)

Raises:

- (`ArgumentError`)

    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 75

    def write(param_1=nil,param_2=nil)
      if param_1.class.method_defined?(:j_del) && !block_given? && param_2 == nil
        @j_del.java_method(:write, [Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1.j_del)
        return self
      elsif param_1.class == String && !block_given? && param_2 == nil
        @j_del.java_method(:write, [Java::java.lang.String.java_class]).call(param_1)
        return self
      elsif param_1.class == String && param_2.class == String && !block_given?
        @j_del.java_method(:write, [Java::java.lang.String.java_class,Java::java.lang.String.java_class]).call(param_1,param_2)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling write(param_1,param_2)"
    end

### - (`Object`) write_custom_frame(param_1 = nil, param_2 = nil, param_3 = nil)

Raises:

- (`ArgumentError`)

    378
    379
    380
    381
    382
    383
    384
    385
    386
    387
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 378

    def write_custom_frame(param_1=nil,param_2=nil,param_3=nil)
      if param_1.class.method_defined?(:j_del) && !block_given? && param_2 == nil && param_3 == nil
        @j_del.java_method(:writeCustomFrame, [Java::IoVertxCoreHttp::HttpFrame.java_class]).call(param_1.j_del)
        return self
      elsif param_1.class == Fixnum && param_2.class == Fixnum && param_3.class.method_defined?(:j_del) && !block_given?
        @j_del.java_method(:writeCustomFrame, [Java::int.java_class,Java::int.java_class,Java::IoVertxCoreBuffer::Buffer.java_class]).call(param_1,param_2,param_3.j_del)
        return self
      end
      raise ArgumentError, "Invalid arguments when calling write_custom_frame(param_1,param_2,param_3)"
    end

### - (`Boolean`) write_queue_full?

Returns:

- (`Boolean`)

Raises:

- (`ArgumentError`)

    51
    52
    53
    54
    55
    56
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_request.rb', line 51

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