Class InfinispanResponse

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void addSpecificHeaders​(io.netty.handler.codec.http.FullHttpResponse response)  
      void authenticate​(java.lang.String authenticateHeader)
      Adds www-authenticate header.
      java.util.Optional<java.lang.String> authenticateHeader()  
      void charset​(Charset charset)
      Adds a charset.
      void contentAsBytes​(byte[] content)
      Adds content as binary array.
      void contentAsText​(java.lang.String content)
      Adds content as text.
      void contentType​(java.lang.String contentType)
      Adds Content-Type header.
      void httpVersion​(io.netty.handler.codec.http.HttpVersion httpVersion)
      Adds HTTP version header.
      boolean isKeepAlive()
      Checks whether this is a Keep Alive type of response.
      void status​(io.netty.handler.codec.http.HttpResponseStatus httpStatus)
      Adds status code.
      io.netty.handler.codec.http.FullHttpResponse toNettyHttpResponse()
      Renders FullHttpResponse object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InfinispanResponse

        protected InfinispanResponse​(java.util.Optional<InfinispanRequest> request)
    • Method Detail

      • contentAsText

        public void contentAsText​(java.lang.String content)
        Adds content as text. Converts it internally to UTF-8.
        Parameters:
        content - Content.
      • contentAsBytes

        public void contentAsBytes​(byte[] content)
        Adds content as binary array.
        Parameters:
        content - Content.
      • contentType

        public void contentType​(java.lang.String contentType)
        Adds Content-Type header.
        Parameters:
        contentType - Content-Type header.
      • httpVersion

        public void httpVersion​(io.netty.handler.codec.http.HttpVersion httpVersion)
        Adds HTTP version header.
        Parameters:
        httpVersion - HTTP version header.
      • status

        public void status​(io.netty.handler.codec.http.HttpResponseStatus httpStatus)
        Adds status code.
        Parameters:
        httpStatus - Status code.
      • isKeepAlive

        public boolean isKeepAlive()
        Checks whether this is a Keep Alive type of response.
        Returns:
        true if the response contains Keep Alive headers.
      • addSpecificHeaders

        protected void addSpecificHeaders​(io.netty.handler.codec.http.FullHttpResponse response)
      • toNettyHttpResponse

        public io.netty.handler.codec.http.FullHttpResponse toNettyHttpResponse()
        Renders FullHttpResponse object.
        Returns:
        FullHttpResponse object based on this InfinispanResponse.
      • authenticate

        public void authenticate​(java.lang.String authenticateHeader)
        Adds www-authenticate header.
        Parameters:
        authenticateHeader - www-authenticate header value.
      • charset

        public void charset​(Charset charset)
        Adds a charset.
        Parameters:
        charset - charset value.
      • authenticateHeader

        public java.util.Optional<java.lang.String> authenticateHeader()