public interface PackageNotificationSession extends OsidSession
This session defines methods to receive asynchronous notifications on
adds/changes to Package
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 views defined in this session correspond to the views in the
PackageLookupSession.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForPackageNotifications()
Tests if this user can register for
Package
notifications. |
Depot |
getDepot()
Gets the
Depot associated with this session. |
Id |
getDepotId()
Gets the
Depot Id associated with this
session. |
void |
registerForChangedPackage(Id packageId)
Registers for notification of an updated package.
|
void |
registerForChangedPackages()
Registers for notification of updated packages.
|
void |
registerForDeletedPackage(Id packageId)
Registers for notification of a deleted package.
|
void |
registerForDeletedPackages()
Registers for notification of deleted packages.
|
void |
registerForNewPackages()
Register for notifications of new packages.
|
void |
useFederatedDepotView()
Federates the view for methods in this session.
|
void |
useIsolatedDepotView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getDepotId()
Depot
Id
associated with this
session. Depot Id
associated with this sessionmandatory
- This method must be implemented. Depot getDepot() throws OperationFailedException, PermissionDeniedException
Depot
associated with this session. Depot
associated with this sessionOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForPackageNotifications()
Package
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 useFederatedDepotView()
mandatory
- This method is must be implemented. void useIsolatedDepotView()
mandatory
- This method is must be implemented. void registerForNewPackages() throws OperationFailedException, PermissionDeniedException
PackageReceiver.newPackages()
is invoked when a new package is
created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPackages() throws OperationFailedException, PermissionDeniedException
PackageReceiver.changedPackages()
is invoked when a package is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedPackage(Id packageId) throws OperationFailedException, PermissionDeniedException
PackageReceiver.changedPackages()
is invoked when the
specified package is changed.packageId
- the Id
of the Package
to monitorNullArgumentException
- packageId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPackages() throws OperationFailedException, PermissionDeniedException
PackageReceiver.deletedPackages()
is invoked when a package is
removed from this depot.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedPackage(Id packageId) throws OperationFailedException, PermissionDeniedException
PackageReceiver.deletedPackages()
is invoked when the
specified package is removed from this depot.packageId
- the Id
of the Package
to monitorNullArgumentException
- packageId is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.