Class 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 Mutiny-ified interface using Vert.x codegen.

    • Constructor Detail

      • Response

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

        public Response​(Object delegate)
    • Method Detail

      • getDelegate

        public io.vertx.redis.client.Response getDelegate()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • toMulti

        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.
      • 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.
      • 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)