io.vertx.rxjava.redis.client

## Class Response

- java.lang.Object
- - io.vertx.rxjava.redis.client.Response

- All Implemented Interfaces:
    Iterable<Response>

      public class Response
      extends Object
      implements Iterable<Response>

  The response received from the REDIS server. Redis responses can have several representations:
  - simple string - C string
  - integer - 64bit integer value
  - bulk - byte array
  - multi - list
  Due to the dynamic nature the response object will try to cast the received response to the desired type. A special case should be noted that multi responses are also handled by the response object as it implements the iterable interface. So in this case constructs like for loops on the response will give you access to the underlying elements.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static io.vertx.lang.rx.TypeArg<Response>` | `__TYPE_ARG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Response(Object delegate)`
    `Response(Response delegate)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Response>` | `attributes()` RESP3 responses may include attributes
    `boolean` | `containsKey(String key)` Does this multi response contains a string key.
    `boolean` | `equals(Object o)`
    `Response` | `get(int index)` Get this multi response value at a numerical index.
    `Response` | `get(String key)` Get this multi response value at a string key.
    `Response` | `getDelegate()`
    `Set<String>` | `getKeys()` Get this multi response keys from a hash.
    `int` | `hashCode()`
    `Iterator<Response>` | `iterator()`
    `static Response` | `newInstance(Response arg)`
    `int` | `size()` Get this size of this multi response.
    `BigInteger` | `toBigInteger()` Get this response as a BigInteger.
    `Boolean` | `toBoolean()` Get this response as a Boolean.
    `Buffer` | `toBuffer()` Get this response as Buffer.
    `Byte` | `toByte()` Get this response as a Byte.
    `byte[]` | `toBytes()` Get this response as a byte[].
    `Double` | `toDouble()` Get this response as a Double.
    `Float` | `toFloat()` Get this response as a Float.
    `Integer` | `toInteger()` Get this response as a Integer.
    `Long` | `toLong()` Get this response as a Long.
    `Number` | `toNumber()` Get this response as a Number.
    `Short` | `toShort()` Get this response as a Short.
    `String` | `toString()` Get this response as a String.
    `String` | `toString(Charset encoding)` Get this response as a String encoded with the given charset.
    `ResponseType` | `type()` The response return type.

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.lang.Iterable

      `forEach, spliterator`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<Response> __TYPE_ARG

  - ### Constructor Detail

    - #### Response

          public Response(Response delegate)

    - #### Response

          public Response(Object delegate)

  - ### Method Detail

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### iterator

          public Iterator<Response> iterator()

      Specified by:
        `iterator` in interface `Iterable<Response>`

    - #### getDelegate

          public Response getDelegate()

    - #### type

          public ResponseType type()

      The response return type.
      Returns:
        the type.

    - #### attributes

          public Map<String,Response> attributes()

      RESP3 responses may include attributes
      Returns:
        the a key value map of attributes to this response.

    - #### toString

          public String toString()

      Get this response as a String.
      Overrides:
        `toString` in class `Object`
      Returns:
        string value

    - #### toDouble

          public Double toDouble()

      Get this response as a Double.
      Returns:
        double value.

    - #### toFloat

          public Float toFloat()

      Get this response as a Float.
      Returns:
        double value.

    - #### toLong

          public Long toLong()

      Get this response as a Long.
      Returns:
        long value.

    - #### toInteger

          public Integer toInteger()

      Get this response as a Integer.
      Returns:
        int value.

    - #### toShort

          public Short toShort()

      Get this response as a Short.
      Returns:
        short value.

    - #### toByte

          public Byte toByte()

      Get this response as a Byte.
      Returns:
        byte value.

    - #### toBoolean

          public Boolean toBoolean()

      Get this response as a Boolean.
      Returns:
        boolean value.

    - #### toBuffer

          public Buffer toBuffer()

      Get this response as Buffer.
      Returns:
        buffer value.

    - #### get

          public Response get(int index)

      Get this multi response value at a numerical index.
      Parameters:
        `index` - the required index.
      Returns:
        Response value.

    - #### get

          public Response get(String key)

      Get this multi response value at a string key. Note that REDIS does not support strings as keys but by convention it encodes hashes in lists where index i is the key, and index i+1 is the value.
      Parameters:
        `key` - the required key.
      Returns:
        Response value.

    - #### containsKey

          public boolean containsKey(String key)

      Does this multi response contains a string key. Note that REDIS does not support strings as keys but by convention it encodes hashes in lists where index i is the key, and index i+1 is the value.
      Parameters:
        `key` - the required key.
      Returns:
        Response value.

    - #### getKeys

          public Set<String> getKeys()

      Get this multi response keys from a hash. Note that REDIS does not support strings as keys but by convention it encodes hashes in lists where index i is the key, and index i+1 is the value.
      Returns:
        the set of keys.

    - #### size

          public int size()

      Get this size of this multi response.
      Returns:
        the size of the multi.

    - #### toNumber

          public Number toNumber()

      Get this response as a Number. In contrast to other numeric getters, this will not perform any conversion if the underlying type is not numeric.
      Returns:
        number value

    - #### toBigInteger

          public BigInteger toBigInteger()

      Get this response as a BigInteger.
      Returns:
        long value.

    - #### toString

          public String toString(Charset encoding)

      Get this response as a String encoded with the given charset.
      Parameters:
        `encoding` -
      Returns:
        String value.

    - #### toBytes

          public byte[] toBytes()

      Get this response as a byte[].
      Returns:
        byte[] value.

    - #### newInstance

          public static Response newInstance(Response arg)

Copyright © 2021 Eclipse. All rights reserved.