Class Response

java.lang.Object
io.vertx.mutiny.redis.client.Response
All Implemented Interfaces:
MutinyDelegate, Iterable<Response>

public class Response extends Object implements MutinyDelegate, 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 Mutiny-ified interface using Vert.x codegen.

  • Field Details

  • Constructor Details

    • Response

      public Response(io.vertx.redis.client.Response delegate)
    • Response

      public Response(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.redis.client.Response getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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>
    • toMulti

      @CheckReturnValue public io.smallrye.mutiny.Multi<Response> toMulti()
    • type

      public io.vertx.redis.client.ResponseType type()
      Returns:
      the type.
    • attributes

      public Map<String,Response> attributes()
      Returns:
      the a key value map of attributes to this response.
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      string value
    • format

      public String format()
      Returns:
    • toDouble

      public Double toDouble()
      Returns:
      double value.
    • toFloat

      public Float toFloat()
      Returns:
      double value.
    • toLong

      public Long toLong()
      Returns:
      long value.
    • toInteger

      public Integer toInteger()
      Returns:
      int value.
    • toShort

      public Short toShort()
      Returns:
      short value.
    • toByte

      public Byte toByte()
      Returns:
      byte value.
    • toBoolean

      public Boolean toBoolean()
      Returns:
      boolean value.
    • toBuffer

      public Buffer toBuffer()
      Returns:
      buffer value.
    • get

      public Response get(int index)
      Parameters:
      index - the required index.
      Returns:
      Response value.
    • get

      public Response get(String key)
      Parameters:
      key - the required key.
      Returns:
      Response value.
    • containsKey

      public boolean containsKey(String key)
      Parameters:
      key - the required key.
      Returns:
      Response value.
    • getKeys

      public Set<String> getKeys()
      Returns:
      the set of keys.
    • size

      public int size()
      Returns:
      the size of the multi.
    • isArray

      public boolean isArray()
      Returns:
      whether this multi response is an array
    • isMap

      public boolean isMap()
      Returns:
      whether this multi response is a map
    • toNumber

      public Number toNumber()
      Returns:
      number value
    • toBigInteger

      public BigInteger toBigInteger()
      Returns:
      long value.
    • toString

      public String toString(Charset encoding)
      Parameters:
      encoding -
      Returns:
      String value.
    • toBytes

      public byte[] toBytes()
      Returns:
      byte[] value.
    • newInstance

      public static Response newInstance(io.vertx.redis.client.Response arg)