public interface FamilyNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Family
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 Family
object itself. Adding and removing relationships result in notifications
available from the notification session for rules.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeFamilyNotification(Id notificationId)
Acknowledge a family notification.
|
boolean |
canRegisterForFamilyNotifications()
Tests if this user can register for
Family
notifications. |
void |
registerForChangedFamilies()
Registers for notification of updated families.
|
void |
registerForChangedFamily(Id familyId)
Registers for notification of an updated family.
|
void |
registerForChangedFamilyHierarchy()
Registers for notification of an updated family hierarchy structure.
|
void |
registerForChangedFamilyHierarchyForAncestors(Id familyId)
Registers for notification of an updated family hierarchy structure.
|
void |
registerForChangedFamilyHierarchyForDescendants(Id familyId)
Registers for notification of an updated family hierarchy structure.
|
void |
registerForDeletedFamilies()
Registers for notification of deleted families.
|
void |
registerForDeletedFamily(Id familyId)
Registers for notification of a deleted family.
|
void |
registerForNewFamilies()
Register for notifications of new families.
|
void |
reliableFamilyNotifications()
Reliable notifications are desired.
|
void |
unreliableFamilyNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForFamilyNotifications()
Family
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 reliableFamilyNotifications()
acknowledgeFamilyNotification()
.mandatory
- This method is must be implemented. void unreliableFamilyNotifications()
mandatory
- This method is must be implemented. void acknowledgeFamilyNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewFamilies() throws OperationFailedException, PermissionDeniedException
FamilyReceiver.newFamilies()
is invoked when a new
Family
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFamilies() throws OperationFailedException, PermissionDeniedException
FamilyReceiver.changedFamilies()
is invoked when a family is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFamily(Id familyId) throws OperationFailedException, PermissionDeniedException
FamilyReceiver.changedFamilies()
is invoked when the specified
family is changed.familyId
- the Id
of the Family
to
monitorNullArgumentException
- familyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedFamilies() throws OperationFailedException, PermissionDeniedException
FamilyReceiver.deletedFamilies()
is invoked when a family is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedFamily(Id familyId) throws OperationFailedException, PermissionDeniedException
FamilyReceiver.deletedFamilies()
is invoked when the specified
family is deleted.familyId
- the Id
of the Family
to
monitorNullArgumentException
- familyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFamilyHierarchy() throws OperationFailedException, PermissionDeniedException
FamilyReceiver.changedChildOfFamilies()
is invoked when
a node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFamilyHierarchyForAncestors(Id familyId) throws OperationFailedException, PermissionDeniedException
FamilyReceiver.changedChildOfFamilies()
is invoked when
the specified node or any of its ancestors experiences a change in its
children.familyId
- the Id
of the Family
node to monitorNullArgumentException
- familyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFamilyHierarchyForDescendants(Id familyId) throws OperationFailedException, PermissionDeniedException
FamilyReceiver.changedChildOfFamilies()
is invoked when
the specified node or any of its descendants experiences a change in
its children.familyId
- the Id
of the Family
node to monitorNullArgumentException
- familyId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.