public interface RealmNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Realm
objects. This session is intended for consumers
needing to synchronize their state with this service without the use of
polling. Notifications are cancelled when this session is closed.
Notifications are triggered with changes to the Realm
object itself. Adding and removing persons result in notifications
available from the notification session for persons.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForRealmNotifications()
Tests if this user can register for
Realm
notifications. |
void |
registerForChangedRealm(Id realmId)
Registers for notification of an updated realm.
|
void |
registerForChangedRealms()
Registers for notification of updated realms.
|
void |
registerForDeletedRealm(Id realmId)
Registers for notification of a deleted realm.
|
void |
registerForDeletedRealmAncestors(Id realmId)
Registers for notification of an updated hierarchy structure that
removes an ancestor of the specified realm.
|
void |
registerForDeletedRealmDescendants(Id realmId)
Registers for notification of an updated hierarchy structure that
removes a descendant of the specified realm.
|
void |
registerForDeletedRealms()
Registers for notification of deleted realms.
|
void |
registerForNewRealmAncestors(Id realmId)
Registers for notification of an updated hierarchy structure that
introduces a new ancestor of the specified realm.
|
void |
registerForNewRealmDescendants(Id realmId)
Registers for notification of an updated hierarchy structure that
introduces a new descendant of the specified realm.
|
void |
registerForNewRealms()
Register for notifications of new realms.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForRealmNotifications()
Realm
notifications. A return of true does not guarantee successful
authorization. A return of false indicates that it is known all
methods in this session will result in a PERMISSION_DENIED.
This is intended as a hint to an application that may opt not
to offer notification operations. false
if notification methods are not
authorized, true
otherwisemandatory
- This method must be implemented. void registerForNewRealms() throws OperationFailedException, PermissionDeniedException
RealmReceiver.newRealm()
is invoked when a new Realm
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRealmAncestors(Id realmId) throws OperationFailedException, PermissionDeniedException
RealmReceiver.newAncestorRealms()
is invoked when the
specified realm node gets a new ancestor.realmId
- the Id
of the Realm
node
to monitorNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRealmDescendants(Id realmId) throws OperationFailedException, PermissionDeniedException
RealmReceiver.newDescendantRealm()
is invoked when the
specified realm node gets a new descendant.realmId
- the Id
of the Realm
node
to monitorNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRealms() throws OperationFailedException, PermissionDeniedException
RealmReceiver.changedRealms()
is invoked when a realm is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRealm(Id realmId) throws OperationFailedException, PermissionDeniedException
RealmReceiver.changedRealms()
is invoked when the specified
realm is changed.realmId
- the Id
of the Realm
to
monitorNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRealms() throws OperationFailedException, PermissionDeniedException
RealmReceiver.deletedRealms()
is invoked when a realm is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRealm(Id realmId) throws OperationFailedException, PermissionDeniedException
RealmReceiver.deletedRealms()
is invoked when the specified
realm is deleted.realmId
- the Id
of the Realm
to
monitorNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRealmAncestors(Id realmId) throws OperationFailedException, PermissionDeniedException
RealmReceiver.deletedAncestorRealm()
is invoked when the
specified realm node loses an ancestor.realmId
- the Id
of the Realm
to
monitorNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRealmDescendants(Id realmId) throws OperationFailedException, PermissionDeniedException
RealmReceiver.deletedDescendantRealm()
is invoked when the
specified realm node loses a descendant.realmId
- the Id
of the Realm
to
monitorNullArgumentException
- realmId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.