Class NettyWebResponse

java.lang.Object
org.serviceconnector.web.netty.NettyWebResponse
All Implemented Interfaces:
IWebResponse

public class NettyWebResponse extends Object implements IWebResponse
The Class NettyWebResponse.
  • Constructor Details

    • NettyWebResponse

      public NettyWebResponse(io.netty.handler.codec.http.FullHttpResponse httpResponse)
      Instantiates a new netty web response.
      Parameters:
      httpResponse - the response
  • Method Details

    • addHeader

      public void addHeader(String name, String value)
      Adds the header.
      Specified by:
      addHeader in interface IWebResponse
      Parameters:
      name - the name
      value - the value
    • getOutputStream

      public OutputStream getOutputStream()
      Gets the output stream.
      Specified by:
      getOutputStream in interface IWebResponse
      Returns:
      the output stream
    • getBytes

      public byte[] getBytes()
      Gets the bytes.
      Specified by:
      getBytes in interface IWebResponse
      Returns:
      the bytes
    • setContentType

      public void setContentType(String contentType)
      Sets the content type.
      Specified by:
      setContentType in interface IWebResponse
      Parameters:
      contentType - the new content type
    • redirect

      public void redirect(String path)
      Description copied from interface: IWebResponse
      Redirect.
      Specified by:
      redirect in interface IWebResponse
      Parameters:
      path - the path
    • isRedirect

      public boolean isRedirect()
      Description copied from interface: IWebResponse
      Checks if is redirect.
      Specified by:
      isRedirect in interface IWebResponse
      Returns:
      true, if is redirect