public interface BillingNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Billing
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 Billing
object itself. Adding and removing credits result in notifications
available from the notification session for credits.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeBillingNotification(Id notificationId)
Acknowledge a billing notification.
|
boolean |
canRegisterForBillingNotifications()
Tests if this user can register for
Billing
notifications. |
void |
registerForChangedBilling(Id billingId)
Registers for notification of an updated billing.
|
void |
registerForChangedBillingHierarchy()
Registers for notification of an updated billing hierarchy structure.
|
void |
registerForChangedBillingHierarchyForAncestors(Id billingId)
Registers for notification of an updated billing hierarchy structure.
|
void |
registerForChangedBillingHierarchyForDescendants(Id billingId)
Registers for notification of an updated billing hierarchy structure.
|
void |
registerForChangedBillings()
Registers for notification of updated billings.
|
void |
registerForDeletedBilling(Id billingId)
Registers for notification of a deleted billing.
|
void |
registerForDeletedBillings()
Registers for notification of deleted billings.
|
void |
registerForNewBillings()
Register for notifications of new billings.
|
void |
reliableBillingNotifications()
Reliable notifications are desired.
|
void |
unreliableBillingNotifications()
Unreliable notifications are desired.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
boolean canRegisterForBillingNotifications()
Billing
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 reliableBillingNotifications()
acknowledgeBillingNotification()
.mandatory
- This method is must be implemented. void unreliableBillingNotifications()
mandatory
- This method is must be implemented. void acknowledgeBillingNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewBillings() throws OperationFailedException, PermissionDeniedException
BillingReceiver.newBillings()
is invoked when a new
Billing
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBillings() throws OperationFailedException, PermissionDeniedException
BillingReceiver.changedBillings()
is invoked when a billing is
changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBilling(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.changedBillings()
is invoked when the
specified billing is changed.billingId
- the Id
of the Billing
to monitorNullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBillings() throws OperationFailedException, PermissionDeniedException
BillingReceiver.deletedBillings()
is invoked when a billing is
deleted.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBilling(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.deletedBillings()
is invoked when the
specified billing is deleted.billingId
- the Id
of the Billing
to monitorNullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBillingHierarchy() throws OperationFailedException, PermissionDeniedException
BillingReceiver.changedChildOfBillings()
is invoked
when a node experiences a change in its children.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBillingHierarchyForAncestors(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.changedChildOfBillings()
is invoked
when the specified node or any of its ancestors experiences a change
in its children.billingId
- the Id
of the Billing
node to monitorNullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedBillingHierarchyForDescendants(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.changedChildOfBillings()
is invoked
when the specified node or any of its descendants experiences a change
in its children.billingId
- the Id
of the Billing
node to monitorNullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.