public interface ItemNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Item
objects in this Business.
This also
includes existing items that may appear or disappear due to changes in the
Business
hierarchy, 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
ItemLookupSession.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeItemNotification(Id notificationId)
Acknowledge an item notification.
|
boolean |
canRegisterForItemNotifications()
Tests if this user can register for
Item notifications. |
Business |
getBusiness()
Gets the
Business associated with this session. |
Id |
getBusinessId()
Gets the
Business Id associated with
this session. |
void |
registerForChangedItem(Id itemId)
Registers for notification of an updated item.
|
void |
registerForChangedItems()
Registers for notification of updated items.
|
void |
registerForDeletedItem(Id itemId)
Registers for notification of a deleted item.
|
void |
registerForDeletedItems()
Registers for notification of deleted items.
|
void |
registerForNewItems()
Register for notifications of new items.
|
void |
reliableItemNotifications()
Reliable notifications are desired.
|
void |
unreliableItemNotifications()
Unreliable notifications are desired.
|
void |
useFederatedBusinessView()
Federates the view for methods in this session.
|
void |
useIsolatedBusinessView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBusinessId()
Business
Id
associated with
this session. Business Id
associated with this sessionmandatory
- This method must be implemented. Business getBusiness() throws OperationFailedException, PermissionDeniedException
Business
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForItemNotifications()
Item
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 useFederatedBusinessView()
mandatory
- This method is must be implemented. void useIsolatedBusinessView()
mandatory
- This method is must be implemented. void reliableItemNotifications()
acknowledgeItemNotification()
.mandatory
- This method is must be implemented. void unreliableItemNotifications()
mandatory
- This method is must be implemented. void acknowledgeItemNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.newItems()
is invoked when a new Item
appears in this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.changedItems()
is invoked when a customer in this
business is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedItem(Id itemId) throws OperationFailedException, PermissionDeniedException
ItemReceiver.changedItems()
is invoked when the specified item
in this business is changed.itemId
- the Id
of the Item
to
monitorNullArgumentException
- itemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedItems() throws OperationFailedException, PermissionDeniedException
ItemReceiver.deletedItems()
is invoked when an item is deleted
or removed from this business.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedItem(Id itemId) throws OperationFailedException, PermissionDeniedException
ItemReceiver.deletedItems()
is invoked when the specified item
is deleted or removed from this business.itemId
- the Id
of the Item
to
monitorNullArgumentException
- itemId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.