Interface WebConnection

All Superinterfaces:
java.lang.AutoCloseable

public interface WebConnection
extends java.lang.AutoCloseable
This interface encapsulates the connection for an upgrade request. It allows the protocol handler to send service requests and status queries to the container.
Since:
Servlet 3.1
  • Method Summary

    Modifier and Type Method Description
    ServletInputStream getInputStream()
    Returns an input stream for this web connection.
    ServletOutputStream getOutputStream()
    Returns an output stream for this web connection.

    Methods inherited from interface java.lang.AutoCloseable

    close
  • Method Details

    • getInputStream

      ServletInputStream getInputStream() throws java.io.IOException
      Returns an input stream for this web connection.
      Returns:
      a ServletInputStream for reading binary data
      Throws:
      java.io.IOException - if an I/O error occurs
    • getOutputStream

      ServletOutputStream getOutputStream() throws java.io.IOException
      Returns an output stream for this web connection.
      Returns:
      a ServletOutputStream for writing binary data
      Throws:
      java.io.IOException - if an I/O error occurs