Class ClientListener


  • public abstract class ClientListener
    extends java.lang.Object
    This class contains all functions which, if registered at the client object, will be called when certain events are happening.
    See Also:
    Client
    • Constructor Summary

      Constructors 
      Constructor Description
      ClientListener()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onCloseFailed​(java.lang.Exception e)
      Will be called if the disconnection and closing process failed
      void onCloseRequested()
      Will be called before the disconnection and closing processes being initiated
      void onCloseSuccess()
      Will be called after finishing the disconnection process
      void onConnectionCreation()
      Will be called before the Client tries to connect to the server
      void onConnectionFailed​(java.lang.Exception e)
      Will be called if an error occured while trying to connect to the server
      void onConnectionSuccess()
      Will be called if the connection to the server was successful
      • Methods inherited from class java.lang.Object

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

      • ClientListener

        public ClientListener()
    • Method Detail

      • onConnectionCreation

        public void onConnectionCreation()
        Will be called before the Client tries to connect to the server
      • onConnectionSuccess

        public void onConnectionSuccess()
        Will be called if the connection to the server was successful
      • onConnectionFailed

        public void onConnectionFailed​(java.lang.Exception e)
        Will be called if an error occured while trying to connect to the server
        Parameters:
        e - the exception which was thrown
      • onCloseRequested

        public void onCloseRequested()
        Will be called before the disconnection and closing processes being initiated
      • onCloseSuccess

        public void onCloseSuccess()
        Will be called after finishing the disconnection process
      • onCloseFailed

        public void onCloseFailed​(java.lang.Exception e)
        Will be called if the disconnection and closing process failed
        Parameters:
        e - the exception which was thrown