public 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.
| Modifier and Type | Field and Description |
|---|---|
static int |
CLIENT_DISABLED
The FTL server administratively disabled this client.
|
| Modifier and Type | Method and Description |
|---|---|
void |
onNotification(int type,
java.lang.String reason)
Process out-of-band notifications.
|
static final int CLIENT_DISABLED
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.close on the disabled realm object,
and then create a new realm object by calling
FTL.connectToRealmServer.
Other programs may restart or exit.
void onNotification(int type,
java.lang.String reason)
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.
type - A notification code, which indicates the type of condition.reason - A string describing the reason for the notification.