Class ServletWebSocketHttpExchange

java.lang.Object
io.undertow.servlet.websockets.ServletWebSocketHttpExchange
All Implemented Interfaces:
io.undertow.websockets.spi.WebSocketHttpExchange, Closeable, AutoCloseable

public class ServletWebSocketHttpExchange extends Object implements io.undertow.websockets.spi.WebSocketHttpExchange
Author:
Stuart Douglas
  • Constructor Details

    • ServletWebSocketHttpExchange

      public ServletWebSocketHttpExchange(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Set<io.undertow.websockets.core.WebSocketChannel> peerConnections)
  • Method Details

    • putAttachment

      public <T> void putAttachment(io.undertow.util.AttachmentKey<T> key, T value)
      Specified by:
      putAttachment in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getAttachment

      public <T> T getAttachment(io.undertow.util.AttachmentKey<T> key)
      Specified by:
      getAttachment in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getRequestHeader

      public String getRequestHeader(String headerName)
      Specified by:
      getRequestHeader in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getRequestHeaders

      public Map<String,List<String>> getRequestHeaders()
      Specified by:
      getRequestHeaders in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getResponseHeader

      public String getResponseHeader(String headerName)
      Specified by:
      getResponseHeader in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getResponseHeaders

      public Map<String,List<String>> getResponseHeaders()
      Specified by:
      getResponseHeaders in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • setResponseHeaders

      public void setResponseHeaders(Map<String,List<String>> headers)
      Specified by:
      setResponseHeaders in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • setResponseHeader

      public void setResponseHeader(String headerName, String headerValue)
      Specified by:
      setResponseHeader in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • upgradeChannel

      public void upgradeChannel(io.undertow.server.HttpUpgradeListener upgradeCallback)
      Specified by:
      upgradeChannel in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • sendData

      public org.xnio.IoFuture<Void> sendData(ByteBuffer data)
      Specified by:
      sendData in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • readRequestData

      public org.xnio.IoFuture<byte[]> readRequestData()
      Specified by:
      readRequestData in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • endExchange

      public void endExchange()
      Specified by:
      endExchange in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getRequestScheme

      public String getRequestScheme()
      Specified by:
      getRequestScheme in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getRequestURI

      public String getRequestURI()
      Specified by:
      getRequestURI in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getBufferPool

      public io.undertow.connector.ByteBufferPool getBufferPool()
      Specified by:
      getBufferPool in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getQueryString

      public String getQueryString()
      Specified by:
      getQueryString in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getSession

      public Object getSession()
      Specified by:
      getSession in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getRequestParameters

      public Map<String,List<String>> getRequestParameters()
      Specified by:
      getRequestParameters in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getUserPrincipal

      public Principal getUserPrincipal()
      Specified by:
      getUserPrincipal in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • isUserInRole

      public boolean isUserInRole(String role)
      Specified by:
      isUserInRole in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getPeerConnections

      public Set<io.undertow.websockets.core.WebSocketChannel> getPeerConnections()
      Specified by:
      getPeerConnections in interface io.undertow.websockets.spi.WebSocketHttpExchange
    • getOptions

      public org.xnio.OptionMap getOptions()
      Specified by:
      getOptions in interface io.undertow.websockets.spi.WebSocketHttpExchange