Class SocketIOAtmosphereHandler

  • All Implemented Interfaces:
    org.atmosphere.cpr.AtmosphereHandler

    public abstract class SocketIOAtmosphereHandler
    extends java.lang.Object
    implements org.atmosphere.cpr.AtmosphereHandler
    Author:
    Sebastien Dionne : sebastien.dionne@gmail.com, Jeanfrancois Arcand
    • Field Detail

      • SOCKETIO_SESSION_OUTBOUND

        public static final java.lang.String SOCKETIO_SESSION_OUTBOUND
        See Also:
        Constant Field Values
      • SOCKETIO_SESSION_ID

        public static final java.lang.String SOCKETIO_SESSION_ID
    • Constructor Detail

      • SocketIOAtmosphereHandler

        public SocketIOAtmosphereHandler()
    • Method Detail

      • onConnect

        public abstract void onConnect​(org.atmosphere.cpr.AtmosphereResource event,
                                       SocketIOSessionOutbound handler)
                                throws java.io.IOException
        Called when the connection is established.
        Parameters:
        handler - The SocketOutbound associated with the connection
        Throws:
        java.io.IOException
      • onDisconnect

        public abstract void onDisconnect​(org.atmosphere.cpr.AtmosphereResource event,
                                          SocketIOSessionOutbound handler,
                                          DisconnectReason reason)
        Called when the socket connection is disconnected.
        Parameters:
        event - AtmosphereResource
        handler - outbound handler to broadcast response
        reason - The reason for the disconnect.
      • onMessage

        public abstract void onMessage​(org.atmosphere.cpr.AtmosphereResource event,
                                       SocketIOSessionOutbound handler,
                                       java.lang.String message)
        Called for each message received.
        Parameters:
        event - AtmosphereResource
        handler - outbound handler to broadcast response
        message - message received
      • onRequest

        public final void onRequest​(org.atmosphere.cpr.AtmosphereResource event)
                             throws java.io.IOException
        Specified by:
        onRequest in interface org.atmosphere.cpr.AtmosphereHandler
        Throws:
        java.io.IOException
      • onStateChange

        public final void onStateChange​(org.atmosphere.cpr.AtmosphereResourceEvent event)
                                 throws java.io.IOException
        Specified by:
        onStateChange in interface org.atmosphere.cpr.AtmosphereHandler
        Throws:
        java.io.IOException
      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.atmosphere.cpr.AtmosphereHandler