Class EngineIoWebSocket


  • public abstract class EngineIoWebSocket
    extends Emitter
    Adapter between different WebSocket implementations and Engine.IO.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract void close()
      Close the WebSocket.
      abstract java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getConnectionHeaders()
      Get the headers in the initial HTTP request.
      abstract java.util.Map<java.lang.String,​java.lang.String> getQuery()
      Get the query of the initial HTTP request.
      abstract void write​(byte[] message)
      Write a byte array to the WebSocket and send to remote client.
      abstract void write​(java.lang.String message)
      Write a string to the WebSocket and send to remote client.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • EngineIoWebSocket

        public EngineIoWebSocket()
    • Method Detail

      • getQuery

        public abstract java.util.Map<java.lang.String,​java.lang.String> getQuery()
        Get the query of the initial HTTP request.
        Returns:
        Query parameters of the initial HTTP request.
      • getConnectionHeaders

        public abstract java.util.Map<java.lang.String,​java.util.List<java.lang.String>> getConnectionHeaders()
        Get the headers in the initial HTTP request.
        Returns:
        Headers of the initial HTTP request.
      • write

        public abstract void write​(java.lang.String message)
                            throws java.io.IOException
        Write a string to the WebSocket and send to remote client.
        Parameters:
        message - String payload to send.
        Throws:
        java.io.IOException - On write error.
      • write

        public abstract void write​(byte[] message)
                            throws java.io.IOException
        Write a byte array to the WebSocket and send to remote client.
        Parameters:
        message - Binary payload to send.
        Throws:
        java.io.IOException - On write error.
      • close

        public abstract void close()
        Close the WebSocket.