public interface ActivityNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Activity
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.
The two views defined in this session correspond to the views in the
ActivityLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeActivityNotification(Id notificationId)
Acknowledge an activity notification.
|
boolean |
canRegisterForActivityNotifications()
Tests if this user can register for
Activity
notifications. |
ObjectiveBank |
getObjectiveBank()
Gets the
ObjectiveBank associated with this session. |
Id |
getObjectiveBankId()
Gets the
ObjectiveBank Id associated
with this session. |
void |
registerForChangedActivities()
Registers for notification of updated activities.
|
void |
registerForChangedActivitiesForObjective(Id objectiveId)
Registers for notification of updated activities.
|
void |
registerForChangedActivity(Id activityId)
Registers for notification of an updated activity.
|
void |
registerForDeletedActivities()
Registers for notification of deleted activities.
|
void |
registerForDeletedActivitiesForObjective(Id objectiveId)
Registers for notification of deleted activities.
|
void |
registerForDeletedActivity(Id activityId)
Registers for notification of a deleted activity.
|
void |
registerForNewActivities()
Register for notifications of new activities.
|
void |
registerForNewActivitiesForObjective(Id objectiveId)
Register for notifications of new activities for the given objective.
|
void |
reliableActivityNotifications()
Reliable notifications are desired.
|
void |
unreliableActivityNotifications()
Unreliable notifications are desired.
|
void |
useFederatedObjectiveBankView()
Federates the view for methods in this session.
|
void |
useIsolatedObjectiveBankView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getObjectiveBankId()
ObjectiveBank
Id
associated
with this session. ObjectiveBank Id
associated with this
sessionmandatory
- This method must be implemented. ObjectiveBank getObjectiveBank() throws OperationFailedException, PermissionDeniedException
ObjectiveBank
associated with this session. ObjectiveBank
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForActivityNotifications()
Activity
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 useFederatedObjectiveBankView()
mandatory
- This method is must be implemented. void useIsolatedObjectiveBankView()
mandatory
- This method is must be implemented. void reliableActivityNotifications()
acknowledgeActivityNotification()
.mandatory
- This method is must be implemented. void unreliableActivityNotifications()
mandatory
- This method is must be implemented. void acknowledgeActivityNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewActivities() throws OperationFailedException, PermissionDeniedException
ActivityReceiver.newActivities()
is invoked when a new
activity is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewActivitiesForObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.newActivities()
is invoked when a new
activity is created.objectiveId
- the Id
of the Activity
to monitorNullArgumentException
- objectiveId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedActivities() throws OperationFailedException, PermissionDeniedException
ActivityReceiver.changedActivities()
is invoked when an
activity is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedActivitiesForObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.changedActivities()
is invoked when an
activity is changed.objectiveId
- the Id
of the Objective
to monitorNullArgumentException
- objectiveId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedActivity(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.changedActivities()
is invoked when the
specified activity is changed.activityId
- the Id
of the Activity
to monitorNullArgumentException
- activityId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivities() throws OperationFailedException, PermissionDeniedException
ActivityReceiver.deletedActivities()
is invoked when an
activity is removed from this objective bank.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivitiesForObjective(Id objectiveId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.deletedActivities()
is invoked when an
activity is removed from this objective bank.objectiveId
- the Id
of the Objective
to monitorNullArgumentException
- objectiveId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedActivity(Id activityId) throws OperationFailedException, PermissionDeniedException
ActivityReceiver.changedActivities()
is invoked when the
specified activity is removed from this objective bank.activityId
- the Id
of the Activity
to monitorNullArgumentException
- activityId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.