Class Net4jWebSocket

java.lang.Object
org.eclipse.net4j.ws.jetty.Net4jWebSocket
All Implemented Interfaces:
org.eclipse.jetty.websocket.api.WebSocketConnectionListener, org.eclipse.jetty.websocket.api.WebSocketListener

public class Net4jWebSocket extends Object implements org.eclipse.jetty.websocket.api.WebSocketListener
Author:
Eike Stepper
  • Field Details

  • Constructor Details

    • Net4jWebSocket

      public Net4jWebSocket()
    • Net4jWebSocket

      public Net4jWebSocket(IWSConnector connector)
      Called by WSClientConnector.
  • Method Details

    • getConnector

      public IWSConnector getConnector()
    • getSession

      public org.eclipse.jetty.websocket.api.Session getSession()
      Since:
      1.1
    • isClient

      public boolean isClient()
    • onWebSocketConnect

      public void onWebSocketConnect(org.eclipse.jetty.websocket.api.Session session)
      Specified by:
      onWebSocketConnect in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
    • close

      public void close()
    • onWebSocketClose

      public void onWebSocketClose(int statusCode, String reason)
      Specified by:
      onWebSocketClose in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener
    • registerChannel

      public void registerChannel(short channelID, long timeout, IProtocol<?> protocol) throws IOException
      Throws:
      IOException
    • deregisterChannel

      public void deregisterChannel(short channelID) throws IOException
      Throws:
      IOException
    • sendBuffer

      public void sendBuffer(IBuffer buffer)
    • onWebSocketBinary

      public void onWebSocketBinary(byte[] payload, int offset, int len)
      Specified by:
      onWebSocketBinary in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketText

      public void onWebSocketText(String message)
      Specified by:
      onWebSocketText in interface org.eclipse.jetty.websocket.api.WebSocketListener
    • onWebSocketError

      public void onWebSocketError(Throwable cause)
      Specified by:
      onWebSocketError in interface org.eclipse.jetty.websocket.api.WebSocketConnectionListener