Package velox.api.layer1
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 Summary
Modifier and TypeMethodDescriptionvoidonConnectionLost(DisconnectionReason reason, @Nullable String message) Connection to server lost.voidConnection to server restored.voidonLoginFailed(LoginFailedReason reason, @Nullable String message) Failed to login with specified credentialsvoidSuccessful login.voidonSystemTextMessage(String message, SystemTextMessageType messageType) Passes the message into Bookmap and shows it as a popup.voidonUserMessage(Object data) Send an upstream event.
-
Method Details
-
onLoginFailed
Failed to login with specified credentials- Parameters:
reason- reason codemessage- test message associated with login fail (may be null)
-
onLoginSuccessful
void onLoginSuccessful()Successful login. -
onConnectionLost
Connection to server lost. Provider can call this method multiple times in sequence if the reason was changed (i.e. fromDisconnectionReason.NO_INTERNETtoDisconnectionReason.FATAL)- Parameters:
reason- reason codemessage- 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 invokedonConnectionLost(DisconnectionReason, String) -
onSystemTextMessage
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 itselfmessageType- message type- See Also:
-
onUserMessage
Send an upstream event. Allows incorporating arbitrary functionality into protocol- Parameters:
data- Message content
-