Class List Method List File List

# Class: Vertx::HttpClientResponse

Inherits:
  Object
  - Object
  - Vertx::HttpClientResponse
  show all
Includes:
  ReadStream
Defined in:
  /Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb

## Instance Method Summary (collapse)

- - (Object) body_handler
- - (Object) cookies
- - (Object) custom_frame_handler
- - (Object) end_handler
- - (Object) exception_handler
- - (Object) get_header(headerName = nil)
- - (Object) get_trailer(trailerName = nil)
- - (Object) handler
- - (Object) headers
- - (HttpClientResponse) initialize(j_del) constructor
  A new instance of HttpClientResponse.
- - (Object) j_del
- - (Object) net_socket
- - (Object) pause
- - (Object) resume
- - (Object) status_code
- - (Object) status_message
- - (Object) trailers
- - (Object) version

## Constructor Details

### - (`HttpClientResponse`) initialize(j_del)

Returns a new instance of HttpClientResponse

    20
    21
    22
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 20

    def initialize(j_del)
      @j_del = j_del
    end

## Instance Method Details

### - (`Object`) body_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) cookies

Raises:

- (`ArgumentError`)

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

    def cookies
      if !block_given?
        if @cached_cookies != nil
          return @cached_cookies
        end
        return @cached_cookies = @j_del.java_method(:cookies, []).call().to_a.map { |elt| elt }
      end
      raise ArgumentError, "Invalid arguments when calling cookies()"
    end

### - (`Object`) custom_frame_handler

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) end_handler

Raises:

- (`ArgumentError`)

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

    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`)

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

    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_header(headerName = nil)

Raises:

- (`ArgumentError`)

    105
    106
    107
    108
    109
    110
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 105

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

### - (`Object`) get_trailer(trailerName = nil)

Raises:

- (`ArgumentError`)

    114
    115
    116
    117
    118
    119
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 114

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

### - (`Object`) handler

Raises:

- (`ArgumentError`)

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

    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::Buffer)) }))
        return self
      end
      raise ArgumentError, "Invalid arguments when calling handler()"
    end

### - (`Object`) headers

Raises:

- (`ArgumentError`)

    93
    94
    95
    96
    97
    98
    99
    100
    101
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 93

    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

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

    def j_del
      @j_del
    end

### - (`Object`) net_socket

Raises:

- (`ArgumentError`)

    171
    172
    173
    174
    175
    176
    177
    178
    179
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 171

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

### - (`Object`) pause

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) resume

Raises:

- (`ArgumentError`)

    29
    30
    31
    32
    33
    34
    35
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 29

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

### - (`Object`) status_code

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) status_message

Raises:

- (`ArgumentError`)

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

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

### - (`Object`) trailers

Raises:

- (`ArgumentError`)

    121
    122
    123
    124
    125
    126
    127
    128
    129
    # File '/Users/julien/java/vertx-stack/stack-docs/target/rb/vertx/http_client_response.rb', line 121

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

### - (`Object`) version

Raises:

- (`ArgumentError`)

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

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