public interface FunctionNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Function
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
FunctionLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeFunctionNotification(Id notificationId)
Acknowledge a function notification.
|
boolean |
canRegisterForFunctionNotifications()
Tests if this user can register for
Function
notifications. |
Vault |
getVault()
Gets the
Vault associated with this session. |
Id |
getVaultId()
Gets the
Vault Id associated with this
session. |
void |
registerForChangedFunction(Id functionId)
Registers for notification of an updated function.
|
void |
registerForChangedFunctions()
Registers for notification of updated functions.
|
void |
registerForDeletedFunction(Id functionId)
Registers for notification of a deleted function.
|
void |
registerForDeletedFunctions()
Registers for notification of deleted functions.
|
void |
registerForNewFunctions()
Register for notifications of new functions.
|
void |
reliableFunctionNotifications()
Reliable notifications are desired.
|
void |
unreliableFunctionNotifications()
Unreliable notifications are desired.
|
void |
useFederatedVaultView()
Federates the view for methods in this session.
|
void |
useIsolatedVaultView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getVaultId()
Vault
Id
associated with this
session. Vault Id
associated with this sessionmandatory
- This method must be implemented. Vault getVault() throws OperationFailedException, PermissionDeniedException
Vault
associated with this session. Vault
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForFunctionNotifications()
Function
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 useFederatedVaultView()
mandatory
- This method is must be implemented. void useIsolatedVaultView()
mandatory
- This method is must be implemented. void reliableFunctionNotifications()
acknowledgeFunctionNotification()
.mandatory
- This method is must be implemented. void unreliableFunctionNotifications()
mandatory
- This method is must be implemented. void acknowledgeFunctionNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewFunctions() throws OperationFailedException, PermissionDeniedException
FunctionReceiver.newFunctions()
is invoked when a new Function
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFunctions() throws OperationFailedException, PermissionDeniedException
FunctionReceiver.changedFunctions()
is invoked when a function
is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedFunction(Id functionId) throws OperationFailedException, PermissionDeniedException
FunctionReceiver.changedFunctions()
is invoked when the
specified function is changed.functionId
- the Id
of the Function
to monitorNullArgumentException
- functionId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedFunctions() throws OperationFailedException, PermissionDeniedException
FunctionReceiver.deletedFunctions()
is invoked when a function
is removed from this vault.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedFunction(Id functionId) throws OperationFailedException, PermissionDeniedException
FunctionReceiver.changedFunctions()
is invoked when the
specified function is removed from this vault.functionId
- the Id
of the Function
to monitorNullArgumentException
- functionId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.