public interface LeaseNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Lease
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.
Notifications are triggered with changes to the Lease
object itself. Adding and removing rooms result in notifications available
from the notification session for rooms.
Modifier and Type | Method and Description |
---|---|
boolean |
canRegisterForLeaseNotifications()
Tests if this user can register for
Lease
notifications. |
Campus |
getCampus()
Gets the
Campus associated with this session. |
Id |
getCampusId()
Gets the
Campus Id associated with this
session. |
void |
registerForChangedLease(Id leaseId)
Registers for notification of an updated lease.
|
void |
registerForChangedLeases()
Registers for notification of updated leases.
|
void |
registerForChangedLeasesForRoom(Id roomId)
Register for notifications of changed leases for the given room
Id. |
void |
registerForChangedLeasesForTenant(Id resourceId)
Register for notifications of changed leases for the given resource
Id. |
void |
registerForDeletedLease(Id leaseId)
Registers for notification of a deleted lease.
|
void |
registerForDeletedLeases()
Registers for notification of deleted leases.
|
void |
registerForDeletedLeasesForRoom(Id roomId)
Register for notifications of changed leases for the given room
Id. |
void |
registerForDeletedLeasesForTenant(Id resourceId)
Register for notifications of changed leases for the given resource
Id. |
void |
registerForNewLeases()
Register for notifications of new leases.
|
void |
registerForNewLeasesForRoom(Id roomId)
Register for notifications of new leases for the given room
Id. |
void |
registerForNewLeasesForTenant(Id resourceId)
Register for notifications of new leases for the given resource
Id. |
void |
useFederatedCampusView()
Federates the view for methods in this session.
|
void |
useIsolatedCampusView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getCampusId()
Campus
Id
associated with this
session. Campus Id
associated with this sessionmandatory
- This method must be implemented. Campus getCampus() throws OperationFailedException, PermissionDeniedException
Campus
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForLeaseNotifications()
Lease
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 useFederatedCampusView()
mandatory
- This method is must be implemented. void useIsolatedCampusView()
mandatory
- This method is must be implemented. void registerForNewLeases() throws OperationFailedException, PermissionDeniedException
LeaseReceiver.newLeases()
is invoked when a new Lease
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewLeasesForRoom(Id roomId) throws OperationFailedException, PermissionDeniedException
Id.
LeaseReceiver.newLeases()
is invoked when a new
Lease
is created.roomId
- the Id
of the room to monitorNullArgumentException
- roomId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewLeasesForTenant(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
LeaseReceiver.newLeases()
is invoked when a
new Lease
is created.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLeases() throws OperationFailedException, PermissionDeniedException
LeaseReceiver.changedLeases()
is invoked when a lease is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLeasesForRoom(Id roomId) throws OperationFailedException, PermissionDeniedException
Id.
LeaseReceiver.changedLeases()
is invoked
when a Lease
for the room is changed.roomId
- the Id
of the room to monitorNullArgumentException
- roomId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLeasesForTenant(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
LeaseReceiver.changedLeases()
is
invoked when a Lease
for the tenant is changed.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedLease(Id leaseId) throws OperationFailedException, PermissionDeniedException
LeaseReceiver.changedLeases()
is invoked when the specified
lease is changed.leaseId
- the Id
of the Lease
to
monitorNullArgumentException
- leaseId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLeases() throws OperationFailedException, PermissionDeniedException
LeaseReceiver.deletedLeases()
is invoked when a lease is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLeasesForRoom(Id roomId) throws OperationFailedException, PermissionDeniedException
Id.
LeaseReceiver.deletedLeases()
is invoked
when a Lease
for the room is deleted.roomId
- the Id
of the room to monitorNullArgumentException
- roomId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLeasesForTenant(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
LeaseReceiver.deletedLeases()
is
invoked when a Lease
for the tenant is deleted.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedLease(Id leaseId) throws OperationFailedException, PermissionDeniedException
LeaseReceiver.deletedLeases()
is invoked when the specified
lease is deleted.leaseId
- the Id
of the Lease
to
monitorNullArgumentException
- leaseId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.