Interface InstructionNotificationSession
- All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession
This session defines methods to receive notifications on adds/changes
to Instruction objects in this Engine . 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
InstructionLookupSession .
-
Method Summary
Modifier and TypeMethodDescriptionvoidacknowledgeInstructionNotification(Id notificationId) Acknowledge an instruction notification.booleanTests if this user can register forInstructionnotifications.Gets theEngineassociated with this session.Gets theEngineIdassociated with this session.voidregisterForChangedInstruction(Id instructionId) Registers for notification of an updated instruction.voidRegisters for notification of updated instructions.voidregisterForChangedInstructionsForAgenda(Id agendaId) Registers for notification of updated instructions related to the given agenda.voidregisterForChangedInstructionsForCheck(Id checkId) Registers for notification of updated instructions related to the given check.voidregisterForDeletedInstruction(Id instructionId) Registers for notification of a deleted instruction.voidRegisters for notification of deleted instructions.voidregisterForDeletedInstructionsForAgenda(Id agendaId) Registers for notification of deleted instruction for an agenda.voidregisterForDeletedInstructionsForCheck(Id checkId) Registers for notification of deleted instruction for a check.voidRegister for notifications of new instructions.voidregisterForNewInstructionsForAgenda(Id agendaId) Register for notifications of new instructions related to the given agenda.voidregisterForNewInstructionsForCheck(Id checkId) Register for notifications of new instructions related to the given agenda.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
-
getEngineId
Id getEngineId()Gets theEngineIdassociated with this session.- Returns:
- the
Engine Idassociated with this session - Compliance:
mandatory- This method must be implemented.
-
getEngine
Gets theEngineassociated with this session.- Returns:
- the engine
- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
canRegisterForInstructionNotifications
boolean canRegisterForInstructionNotifications()Tests if this user can register forInstructionnotifications. 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.
-
useFederatedEngineView
void useFederatedEngineView()Federates the view for methods in this session. A federated view will include instructions in engines which are children of this engine in the engine hierarchy.- Compliance:
mandatory- This method is must be implemented.
-
useIsolatedEngineView
void useIsolatedEngineView()Isolates the view for methods in this session. An isolated view restricts notifications to this engine only.- Compliance:
mandatory- This method is must be implemented.
-
reliableInstructionNotifications
void reliableInstructionNotifications()Reliable notifications are desired. In reliable mode, notifications are to be acknowledged usingacknowledgeInstructionNotification().- Compliance:
mandatory- This method is must be implemented.
-
unreliableInstructionNotifications
void unreliableInstructionNotifications()Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.- Compliance:
mandatory- This method is must be implemented.
-
acknowledgeInstructionNotification
void acknowledgeInstructionNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException Acknowledge an instruction notification.- Parameters:
notificationId- theIdof the notification- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewInstructions
Register for notifications of new instructions.InstructionReceiver.newInstructions()is invoked when a newInstructionappears in this engine.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewInstructionsForAgenda
void registerForNewInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException Register for notifications of new instructions related to the given agenda.InstructionReceiver.newInstructions()is invoked when a newInstructionappears in this engine.- Parameters:
agendaId- theIdof theAgendato monitor- Throws:
NullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForNewInstructionsForCheck
void registerForNewInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException Register for notifications of new instructions related to the given agenda.InstructionReceiver.newInstructions()is invoked when a newInstructionappears in this engine.- Parameters:
checkId- theIdof theCheckto monitor- Throws:
NullArgumentException-checkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedInstructions
Registers for notification of updated instructions.InstructionReceiver.changedInstructions()is invoked when an instruction in this engine is changed.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedInstructionsForAgenda
void registerForChangedInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated instructions related to the given agenda.InstructionReceiver.changedInstructions()is invoked when an instruction related to the agenda in this engine is changed.- Parameters:
agendaId- theIdof theAgendato monitor- Throws:
NullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedInstructionsForCheck
void registerForChangedInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException Registers for notification of updated instructions related to the given check.InstructionReceiver.changedInstructions()is invoked when an instruction related to the check in this engine is changed.- Parameters:
checkId- theIdof theCheckto monitor- Throws:
NullArgumentException-checkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForChangedInstruction
void registerForChangedInstruction(Id instructionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Registers for notification of an updated instruction.InstructionReceiver.changedInstructions()is invoked when the specified instruction in this engine is changed.- Parameters:
instructionId- theIdof theInstructionto monitor- Throws:
NotFoundException- an instruction was not found in this engine identified by the givenIdNullArgumentException-instructionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedInstructions
Registers for notification of deleted instructions.InstructionReceiver.deletedInstructions()is invoked when an instruction is deleted or removed from this engine.- Throws:
OperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedInstructionsForAgenda
void registerForDeletedInstructionsForAgenda(Id agendaId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted instruction for an agenda.InstructionReceiver.deletedInstructions()is invoked when the related instruction is deleted or removed from this engine.- Parameters:
agendaId- theIdof theAgendato monitor- Throws:
NullArgumentException-agendaIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedInstructionsForCheck
void registerForDeletedInstructionsForCheck(Id checkId) throws OperationFailedException, PermissionDeniedException Registers for notification of deleted instruction for a check.InstructionReceiver.deletedInstructions()is invoked when the related instruction is deleted or removed from this engine.- Parameters:
checkId- theIdof theCheckto monitor- Throws:
NullArgumentException-checkIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-
registerForDeletedInstruction
void registerForDeletedInstruction(Id instructionId) throws NotFoundException, OperationFailedException, PermissionDeniedException Registers for notification of a deleted instruction.InstructionReceiver.deletedInstructions()is invoked when the specified instruction is deleted or removed from this engine.- Parameters:
instructionId- theIdof theInstructionto monitor- Throws:
NotFoundException- an instruction was not found identified by the givenIdNullArgumentException-instructionIdisnullOperationFailedException- unable to complete requestPermissionDeniedException- authorization failure- Compliance:
mandatory- This method must be implemented.
-