Interface NotificationHandler
Customer programs implement this interface to process notifications.
Programs create one instance of the notification handler class per realm,
and may store closure data in fields of that instance.
Programs call Realm.setNotificationHandler
to register that instance.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe FTL server administratively disabled this client. -
Method Summary
Modifier and TypeMethodDescriptionvoidonNotification(int type, String reason) Process out-of-band notifications.
-
Field Details
-
CLIENT_DISABLED
static final int CLIENT_DISABLEDThe FTL server administratively disabled this client.The current realm object no longer supports FTL functionality. Nonetheless, the program can still call close or destroy methods on FTL objects in the realm.
To resume FTL functionality, some programs may first call
Realm.closeon the disabled realm object, and then create a new realm object by callingFTL.connectToRealmServer.Other programs may restart or exit.
- See Also:
-
-
Method Details
-
onNotification
Process out-of-band notifications.Programs define this callback method to process notifications. When the FTL library notifies the program out of band, it invokes this method in a thread that the library owns. Notications by-pass event queues.
- Parameters:
type- A notification code, which indicates the type of condition.reason- A string describing the reason for the notification.
-