Interface SessionListener


public interface SessionListener
Interface for Session event callbacks
  • Method Summary

    Modifier and Type Method Description
    void onLoggedIn​(Session session, boolean firstTime)
    Event-Handler/Callback called when user logins
    void onLoggedOff​(Session session)
    Event-Handler/Callback called when user logffs
    void onMesg​(Session session, String command, byte[] data)
    Event-Handler/Callback called when server receives a custom binary message from the client
    void onMesg​(Session session, String command, String data)
    Event-Handler/Callback called when server receives a custom text message from the client
    void onMesg​(Session session, String command, JsonObject dataAsJson)
    Event-Handler/Callback called when server receives a custom json message from the client
    void onSessionTimedOut​(Session session)
    Event-Handler/Callback called when session times out
    void onShutDown​(Session session)
    Event-Handler/Callback called when server begins shuts down but before shutdown message is sent to client
  • Method Details

    • onLoggedIn

      void onLoggedIn​(Session session, boolean firstTime)
      Event-Handler/Callback called when user logins
      Parameters:
      session - - the user's session
      firstTime - - whether its the first time that the user has logged in
    • onLoggedOff

      void onLoggedOff​(Session session)
      Event-Handler/Callback called when user logffs
      Parameters:
      session - - the user's session
    • onSessionTimedOut

      void onSessionTimedOut​(Session session)
      Event-Handler/Callback called when session times out
      Parameters:
      session - - the user's session
    • onShutDown

      void onShutDown​(Session session)
      Event-Handler/Callback called when server begins shuts down but before shutdown message is sent to client
      Parameters:
      session - - the user's session
    • onMesg

      void onMesg​(Session session, String command, JsonObject dataAsJson)
      Event-Handler/Callback called when server receives a custom json message from the client
      Parameters:
      session - - the user's session
      command - - the message command
      dataAsJson - - the message data
    • onMesg

      void onMesg​(Session session, String command, String data)
      Event-Handler/Callback called when server receives a custom text message from the client
      Parameters:
      session - - the user's session
      command - - the message command
      data - - the message data
    • onMesg

      void onMesg​(Session session, String command, byte[] data)
      Event-Handler/Callback called when server receives a custom binary message from the client
      Parameters:
      session - - the user's session
      command - - the message command
      data - - the message data