Class UndertowSession

java.lang.Object
io.undertow.websockets.UndertowSession
All Implemented Interfaces:
jakarta.websocket.Session, Closeable, AutoCloseable

public final class UndertowSession extends Object implements jakarta.websocket.Session
Session implementation which makes use of the high-level WebSocket API of undertow under the hood.
Author:
Norman Maurer
  • Constructor Details

  • Method Details

    • getChannel

      public io.netty.channel.Channel getChannel()
    • getContainer

      public ServerWebSocketContainer getContainer()
      Specified by:
      getContainer in interface jakarta.websocket.Session
    • addMessageHandler

      public void addMessageHandler(jakarta.websocket.MessageHandler messageHandler) throws IllegalStateException
      Specified by:
      addMessageHandler in interface jakarta.websocket.Session
      Throws:
      IllegalStateException
    • addMessageHandler

      public <T> void addMessageHandler(Class<T> clazz, jakarta.websocket.MessageHandler.Whole<T> handler)
      Specified by:
      addMessageHandler in interface jakarta.websocket.Session
    • addMessageHandler

      public <T> void addMessageHandler(Class<T> clazz, jakarta.websocket.MessageHandler.Partial<T> handler)
      Specified by:
      addMessageHandler in interface jakarta.websocket.Session
    • getMessageHandlers

      public Set<jakarta.websocket.MessageHandler> getMessageHandlers()
      Specified by:
      getMessageHandlers in interface jakarta.websocket.Session
    • removeMessageHandler

      public void removeMessageHandler(jakarta.websocket.MessageHandler messageHandler)
      Specified by:
      removeMessageHandler in interface jakarta.websocket.Session
    • getProtocolVersion

      public String getProtocolVersion()
      Specified by:
      getProtocolVersion in interface jakarta.websocket.Session
    • getNegotiatedSubprotocol

      public String getNegotiatedSubprotocol()
      Specified by:
      getNegotiatedSubprotocol in interface jakarta.websocket.Session
    • isSecure

      public boolean isSecure()
      Specified by:
      isSecure in interface jakarta.websocket.Session
    • isOpen

      public boolean isOpen()
      Specified by:
      isOpen in interface jakarta.websocket.Session
    • getMaxIdleTimeout

      public long getMaxIdleTimeout()
      Specified by:
      getMaxIdleTimeout in interface jakarta.websocket.Session
    • setMaxIdleTimeout

      public void setMaxIdleTimeout(long milliseconds)
      Specified by:
      setMaxIdleTimeout in interface jakarta.websocket.Session
    • getId

      public String getId()
      Specified by:
      getId in interface jakarta.websocket.Session
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface jakarta.websocket.Session
      Throws:
      IOException
    • close

      public void close(jakarta.websocket.CloseReason closeReason) throws IOException
      Specified by:
      close in interface jakarta.websocket.Session
      Throws:
      IOException
    • closeInternal

      public void closeInternal() throws IOException
      Throws:
      IOException
    • closeInternal

      public void closeInternal(jakarta.websocket.CloseReason closeReason) throws IOException
      Throws:
      IOException
    • forceClose

      public void forceClose()
    • getRequestURI

      public URI getRequestURI()
      Specified by:
      getRequestURI in interface jakarta.websocket.Session
    • getRequestParameterMap

      public Map<String,List<String>> getRequestParameterMap()
      Specified by:
      getRequestParameterMap in interface jakarta.websocket.Session
    • getQueryString

      public String getQueryString()
      Specified by:
      getQueryString in interface jakarta.websocket.Session
    • getPathParameters

      public Map<String,String> getPathParameters()
      Specified by:
      getPathParameters in interface jakarta.websocket.Session
    • getUserProperties

      public Map<String,Object> getUserProperties()
      Specified by:
      getUserProperties in interface jakarta.websocket.Session
    • getUserPrincipal

      public Principal getUserPrincipal()
      Specified by:
      getUserPrincipal in interface jakarta.websocket.Session
    • setMaxBinaryMessageBufferSize

      public void setMaxBinaryMessageBufferSize(int i)
      Specified by:
      setMaxBinaryMessageBufferSize in interface jakarta.websocket.Session
    • getMaxBinaryMessageBufferSize

      public int getMaxBinaryMessageBufferSize()
      Specified by:
      getMaxBinaryMessageBufferSize in interface jakarta.websocket.Session
    • setMaxTextMessageBufferSize

      public void setMaxTextMessageBufferSize(int i)
      Specified by:
      setMaxTextMessageBufferSize in interface jakarta.websocket.Session
    • getMaxTextMessageBufferSize

      public int getMaxTextMessageBufferSize()
      Specified by:
      getMaxTextMessageBufferSize in interface jakarta.websocket.Session
    • getAsyncRemote

      public jakarta.websocket.RemoteEndpoint.Async getAsyncRemote()
      Specified by:
      getAsyncRemote in interface jakarta.websocket.Session
    • getBasicRemote

      public jakarta.websocket.RemoteEndpoint.Basic getBasicRemote()
      Specified by:
      getBasicRemote in interface jakarta.websocket.Session
    • getOpenSessions

      public Set<jakarta.websocket.Session> getOpenSessions()
      Specified by:
      getOpenSessions in interface jakarta.websocket.Session
    • getNegotiatedExtensions

      public List<jakarta.websocket.Extension> getNegotiatedExtensions()
      Specified by:
      getNegotiatedExtensions in interface jakarta.websocket.Session
    • getConfiguredServerEndpoint

      public ConfiguredServerEndpoint getConfiguredServerEndpoint()
    • setConfiguredServerEndpoint

      public UndertowSession setConfiguredServerEndpoint(ConfiguredServerEndpoint configuredServerEndpoint)
    • getEncoding

      public Encoding getEncoding()
    • getExecutor

      public Executor getExecutor()