Interface Layer1ApiAdminListener

All Known Subinterfaces:
Layer1ApiAdapter, Layer1ApiAdminAdapter, Layer1ApiListener
All Known Implementing Classes:
Layer1ApiDepthFreezer, Layer1ApiInjectorRelay, Layer1ApiRelay, Layer1ApiStrategiesEchoMessagesLayer, Layer1ApiUpstreamRelay

@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class) public interface Layer1ApiAdminListener
Listens to general events, such as login results, disconnections, warnings, etc.
  • Method Details

    • onLoginFailed

      void onLoginFailed(LoginFailedReason reason, @Nullable String message)
      Failed to login with specified credentials
      Parameters:
      reason - reason code
      message - test message associated with login fail (may be null)
    • onLoginSuccessful

      void onLoginSuccessful()
      Successful login.
    • onConnectionLost

      void onConnectionLost(DisconnectionReason reason, @Nullable String message)
      Connection to server lost. Provider can call this method multiple times in sequence if the reason was changed (i.e. from DisconnectionReason.NO_INTERNET to DisconnectionReason.FATAL)
      Parameters:
      reason - reason code
      message - text message associated with login disconnection (may be null)
    • onConnectionRestored

      void onConnectionRestored()
      Connection to server restored. A provider should call it only if it previously invoked onConnectionLost(DisconnectionReason, String)
    • onSystemTextMessage

      void onSystemTextMessage(String message, SystemTextMessageType messageType)
      Passes the message into Bookmap and shows it as a popup. It is suitable for 1-time notifications, but for the general case take a look at the notifications API - Layer1ApiSoundAlertMessage
      Parameters:
      message - message itself
      messageType - message type
      See Also:
    • onUserMessage

      void onUserMessage(Object data)
      Send an upstream event. Allows incorporating arbitrary functionality into protocol
      Parameters:
      data - Message content