Interface ParameterNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Configurations and their properties. This session is intended
for adapters and providers needing to synchronize their state with this
service without the use of polling. Notifications are cancelled when this
session is closed.
Two views are defined;
- federated: parameters defined in configurations that are a parent of this configuration in the configuration hierarchy are included for notifications
- isolated: notifications are restricted to parameters are defined to within this configuration
The methods federateParameterView() and
isolateParameterView() behave as a radio group and one should be selected
before invoking any lookup methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeParameterNotification(Id notificationId) Acknowledge a parameter notification.booleanTests if this user can register forParameternotifications.Gets theConfigurationassociated with this session.Gets theConfigurationIdassociated with this session.voidregisterForChangedParameter(Id parameterId) Assigns a callback for notifications of an update to a parameter.voidAssigns a callback for notification of updated parameters.voidregisterForDeletedParameter(Id parameterId) Assigns a callback for notifications of a deleted parameter.voidAssigns a callback for notification of deleted parameters.voidAssigns a callback for notifications of new parameters.voidReliable notifications are desired.voidUnreliable notifications are desired.voidFederates the view for methods in this session.voidIsolates the view for methods in this session.Methods inherited from interface OsidSession
closeMethods inherited from interface OsidSession
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactionsModifier and TypeMethodDescriptionGets the agent authenticated to this session.Gets theIdof the agent authenticated to this session.Gets the rate of the service clock.getDate()Gets the service date which may be the current date or the effective date in which this session exists.Gets the effective agent in use by this session.Gets theIdof the effective agent in use by this session.Gets theDisplayTextformatTypepreference in effect for this session.Gets the locale indicating the localization preferences in effect for this session.booleanTests if an agent is authenticated to this session.Starts a new transaction for this sesson.booleanTests for the availability of transactions.
-
Method Details
-
getConfigurationId
Id getConfigurationId()Gets theConfigurationIdassociated with this session.- Returns:
- the
Configuration Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getConfiguration
Gets theConfigurationassociated with this session.- Returns:
- the
Configurationassociated with this session - Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForParameterNotifications
boolean canRegisterForParameterNotifications()Tests if this user can register forParameternotifications. 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 aPERMISSION_DENIED. This is intended as a hint to an application that may opt not to offer notification operations.- Returns:
falseif notification methods are not authorized,trueotherwise- Compliance:
mandatory- This method must be implemented.
-
useFederatedConfigurationView
void useFederatedConfigurationView()Federates the view for methods in this session. A federated view will include parameters in configurations of which this registries is a child in the configuration hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedConfigurationView
void useIsolatedConfigurationView()Isolates the view for methods in this session. An isolated view restricts notifications for parameter values to this configuration only.- Compliance:
mandatory- This method is must be implemented.
-
reliableParameterNotifications
void reliableParameterNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeParameterNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableParameterNotifications
void unreliableParameterNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeParameterNotification
void acknowledgeParameterNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge a parameter notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewParameters
Assigns a callback for notifications of new parameters.ParameterReceiver.newParameters()is invoked when a newParameteris added to this configuration.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedParameters
Assigns a callback for notification of updated parameters.ParameterReceiver.changedParameters()is invoked when aParameteris changed in this configuration.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedParameter
void registerForChangedParameter(Id parameterId) throws OperationFailedException, PermissionDeniedException Assigns a callback for notifications of an update to a parameter.ParamaterReceiver.changedParameters()is invoked when the specifiedParameteris changed in this configuration.- Parameters:
parameterId- theIdof theParameterto monitor- Throws:
NullArgumentException-parameterIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedParameters
Assigns a callback for notification of deleted parameters.ParameterReceiver.deletedParamaters()is invoked when aParameteris deleted or removed from this configuration.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedParameter
void registerForDeletedParameter(Id parameterId) throws OperationFailedException, PermissionDeniedException Assigns a callback for notifications of a deleted parameter.ParameterReceiver.deletedParameters()is invoked when the specifiedParameteris deleted or removed from this configuration.- Parameters:
parameterId- theIdof theParameterto monitor- Throws:
NullArgumentException-parameterIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-