public interface DemographicNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Demographic
objects in this Bin.
This
also includes existing Demographics
that may appear or
disappear due to changes in the Bin
hierarchy, 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.
The two views defined in this session correspond to the views in the
DemographicLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForDemographicNotifications()
Tests if this user can register for
Demographic
notifications. |
Bin |
getBin()
Gets the
Bin associated with this session. |
Id |
getBinId()
Gets the
Bin Id associated with this
session. |
void |
registerForChangedDemographic(Id demographicId)
Registers for notification of an updated demographic.
|
void |
registerForChangedDemographics()
Registers for notification of updated demographics.
|
void |
registerForDeletedDemographic(Id demographicId)
Registers for notification of a deleted demographic.
|
void |
registerForDeletedDemographics()
Registers for notification of deleted demographics.
|
void |
registerForNewDemographics()
Register for notifications of new demographics.
|
void |
useFederatedBinView()
Federates the view for methods in this session.
|
void |
useIsolatedBinView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBinId()
Bin
Id
associated with this
session. Bin Id
associated with this sessionmandatory
- This method must be implemented. Bin getBin() throws OperationFailedException, PermissionDeniedException
Bin
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForDemographicNotifications()
Demographic
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 useFederatedBinView()
mandatory
- This method is must be implemented. void useIsolatedBinView()
mandatory
- This method is must be implemented. void registerForNewDemographics() throws OperationFailedException, PermissionDeniedException
DemographicReceiver.newDemographics()
is invoked when a new
Demographic
appears in this bin.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDemographics() throws OperationFailedException, PermissionDeniedException
DemographicReceiver.changedDemographics()
is invoked when a
demographic in this bin is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedDemographic(Id demographicId) throws OperationFailedException, PermissionDeniedException
ProvisionableReceiver.changedDemographics()
is invoked when
the specified demographic in this bin is changed.demographicId
- the Id
of the Demographic
to monitorNullArgumentException
- demographicId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDemographics() throws OperationFailedException, PermissionDeniedException
DemographicReceiver.deletedDemographics()
is invoked when a
demographic is deleted or removed from this bin.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedDemographic(Id demographicId) throws OperationFailedException, PermissionDeniedException
DemographicReceiver.deletedDemographics()
is invoked when the
specified demographic is deleted or removed from this bin.demographicId
- the Id
of the Demographic
to monitorNullArgumentException
- demographicId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.