Class ServletBackChannel

java.lang.Object
org.jolokia.server.core.http.ServletBackChannel
All Implemented Interfaces:
BackChannel

public class ServletBackChannel extends Object implements BackChannel
A back channel using the async request API as specified in the Servlet 3.0 spec.
Since:
19/10/15
Author:
roland
  • Constructor Details

    • ServletBackChannel

      public ServletBackChannel(jakarta.servlet.http.HttpServletRequest pReq)
  • Method Details

    • open

      public void open(Map<String,?> pParams) throws IOException
      Description copied from interface: BackChannel
      Open the channel. Note, that a channel which has been already closed cannot be reopened again.
      Specified by:
      open in interface BackChannel
      Parameters:
      pParams - params for opening the back channel. The following parameter keys should be use for opening:
      • backChannel.contentType - Content-Type to set on the backchannel
      • backChannel.encoding - Encoding used for the client communication
      Throws:
      IOException - if the channel was already closed
    • close

      public void close()
      Description copied from interface: BackChannel
      Close the channel. After this no write is allowed anymore
      Specified by:
      close in interface BackChannel
    • isClosed

      public boolean isClosed()
      Description copied from interface: BackChannel
      Check whether the backchanel is closed
      Specified by:
      isClosed in interface BackChannel
    • getOutputStream

      public OutputStream getOutputStream() throws IOException
      Description copied from interface: BackChannel
      Get the write for writing to the client
      Specified by:
      getOutputStream in interface BackChannel
      Returns:
      output stream for writing out the answer
      Throws:
      IOException - if the channel is already closed.