public interface RuleNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Rule
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.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeRuleNotification(Id notificationId)
Acknowledge a rule notification.
|
boolean |
canRegisterForRuleNotifications()
Tests if this user can register for
Rule notifications. |
Engine |
getEngine()
Gets the
Engine associated with this session. |
Id |
getEngineId()
Gets the
Engine Id associated with this
session. |
void |
registerForChangedRule(Id ruleId)
Registers for notification of an updated rule.
|
void |
registerForChangedRules()
Registers for notification of updated rules.
|
void |
registerForDeletedRule(Id ruleId)
Registers for notification of a deleted rule.
|
void |
registerForDeletedRules()
Registers for notification of deleted rules.
|
void |
registerForNewRules()
Register for notifications of new rules.
|
void |
reliableRuleNotifications()
Reliable notifications are desired.
|
void |
unreliableRuleNotifications()
Unreliable notifications are desired.
|
void |
useFederatedEngineView()
Federates the view for methods in this session.
|
void |
useIsolatedEngineView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getEngineId()
Engine
Id
associated with this
session. Engine Id
associated with this sessionmandatory
- This method must be implemented. Engine getEngine() throws OperationFailedException, PermissionDeniedException
Engine
associated with this session. Engine
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForRuleNotifications()
Rule
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 useFederatedEngineView()
mandatory
- This method is must be implemented. void useIsolatedEngineView()
mandatory
- This method is must be implemented. void reliableRuleNotifications()
acknowledgeRuleNotification()
.mandatory
- This method is must be implemented. void unreliableRuleNotifications()
mandatory
- This method is must be implemented. void acknowledgeRuleNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewRules() throws OperationFailedException, PermissionDeniedException
RuleReceiver.newRules()
is invoked when a new Rule
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRules() throws OperationFailedException, PermissionDeniedException
RuleReceiver.changedRules()
is invoked when a rule is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedRule(Id ruleId) throws OperationFailedException, PermissionDeniedException
RuleReceiver.changedRules()
is invoked when the specified rule
is changed.ruleId
- the Id
of the Rule
to
monitorNullArgumentException
- ruleId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRules() throws OperationFailedException, PermissionDeniedException
RuleReceiver.deletedRules()
is invoked when a rule is removed
from this engine.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedRule(Id ruleId) throws OperationFailedException, PermissionDeniedException
RuleReceiver.deletedRules()
is invoked when the specified rule
is removed from this engine.ruleId
- the Id
of the Rule
to
monitorNullArgumentException
- ruleId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.