Class GrizzlyHttpServerResponse

java.lang.Object
cloud.piranha.http.grizzly.GrizzlyHttpServerResponse
All Implemented Interfaces:
HttpServerResponse

public class GrizzlyHttpServerResponse
extends java.lang.Object
implements HttpServerResponse
The Grizzly implementation of HTTP Server Response.
Author:
Manfred Riem ([email protected])
  • Constructor Summary

    Constructors
    Constructor Description
    GrizzlyHttpServerResponse​(org.glassfish.grizzly.http.server.Response response)
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    void addHeader​(java.lang.String name, java.lang.String value)
    Add the header.
    java.lang.String getHeader​(java.lang.String name)
    Get the header.
    java.io.OutputStream getOutputStream()
    Get the output stream.
    void setHeader​(java.lang.String name, java.lang.String value)
    Set the specified header.
    void setStatus​(int status)
    Set the status.
    void writeHeaders()
    Write the headers.
    void writeStatusLine()
    Write the status line.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface cloud.piranha.http.api.HttpServerResponse

    closeResponse
  • Constructor Details

    • GrizzlyHttpServerResponse

      public GrizzlyHttpServerResponse​(org.glassfish.grizzly.http.server.Response response)
      Constructor.
      Parameters:
      response - the Grizzly response.
  • Method Details

    • addHeader

      public void addHeader​(java.lang.String name, java.lang.String value)
      Description copied from interface: HttpServerResponse
      Add the header.
      Specified by:
      addHeader in interface HttpServerResponse
      Parameters:
      name - the name.
      value - the value.
    • getHeader

      public java.lang.String getHeader​(java.lang.String name)
      Description copied from interface: HttpServerResponse
      Get the header.
      Specified by:
      getHeader in interface HttpServerResponse
      Parameters:
      name - the name.
      Returns:
      the value, or null if not found.
    • getOutputStream

      public java.io.OutputStream getOutputStream()
      Description copied from interface: HttpServerResponse
      Get the output stream.
      Specified by:
      getOutputStream in interface HttpServerResponse
      Returns:
      the output stream.
    • setHeader

      public void setHeader​(java.lang.String name, java.lang.String value)
      Description copied from interface: HttpServerResponse
      Set the specified header.
      Specified by:
      setHeader in interface HttpServerResponse
      Parameters:
      name - the header name.
      value - the header value.
    • setStatus

      public void setStatus​(int status)
      Description copied from interface: HttpServerResponse
      Set the status.
      Specified by:
      setStatus in interface HttpServerResponse
      Parameters:
      status - the status.
    • writeHeaders

      public void writeHeaders() throws java.io.IOException
      Description copied from interface: HttpServerResponse
      Write the headers.
      Specified by:
      writeHeaders in interface HttpServerResponse
      Throws:
      java.io.IOException - when an I/O error occurs.
    • writeStatusLine

      public void writeStatusLine() throws java.io.IOException
      Description copied from interface: HttpServerResponse
      Write the status line.
      Specified by:
      writeStatusLine in interface HttpServerResponse
      Throws:
      java.io.IOException - when an I/O error occurs.