Class WSMessageListener

  • All Implemented Interfaces:
    org.asynchttpclient.ws.WebSocketListener

    public class WSMessageListener
    extends java.lang.Object
    implements org.asynchttpclient.ws.WebSocketListener
    Listener for messages
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onClose​(org.asynchttpclient.ws.WebSocket websocket)  
      void onClose​(org.asynchttpclient.ws.WebSocket websocket, int code, java.lang.String reason)  
      void onError​(java.lang.Throwable t)  
      void onOpen​(org.asynchttpclient.ws.WebSocket websocket)  
      void onTextFrame​(java.lang.String message, boolean finalFragment, int rsv)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.asynchttpclient.ws.WebSocketListener

        onBinaryFrame, onPingFrame, onPongFrame
    • Constructor Detail

      • WSMessageListener

        public WSMessageListener​(com.google.gson.Gson gson,
                                 StreamingEventHandler handler)
    • Method Detail

      • onTextFrame

        public void onTextFrame​(java.lang.String message,
                                boolean finalFragment,
                                int rsv)
        Specified by:
        onTextFrame in interface org.asynchttpclient.ws.WebSocketListener
      • onOpen

        public void onOpen​(org.asynchttpclient.ws.WebSocket websocket)
        Specified by:
        onOpen in interface org.asynchttpclient.ws.WebSocketListener
      • onClose

        public void onClose​(org.asynchttpclient.ws.WebSocket websocket)
      • onClose

        public void onClose​(org.asynchttpclient.ws.WebSocket websocket,
                            int code,
                            java.lang.String reason)
        Specified by:
        onClose in interface org.asynchttpclient.ws.WebSocketListener
      • onError

        public void onError​(java.lang.Throwable t)
        Specified by:
        onError in interface org.asynchttpclient.ws.WebSocketListener