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 |
---|---|
boolean |
canRegisterForBillingNotifications()
Tests if this user can register for
Billing
notifications. |
void |
registerForChangedBilling(Id billingId)
Registers for notification of an updated billing.
|
void |
registerForChangedBillings()
Registers for notification of updated billings.
|
void |
registerForDeletedBilling(Id billingId)
Registers for notification of a deleted billing.
|
void |
registerForDeletedBillingAncestors(Id billingId)
Registers for notification of an updated hierarchy structure that
removes an ancestor of the specified billing
BillingReceiver.deletedAncestor() is invoked when the
specified billing node loses an ancestor. |
void |
registerForDeletedBillingDescendants(Id billingId)
Registers for notification of an updated hierarchy structure that
removes a descendant of the specified billing.
|
void |
registerForDeletedBillings()
Registers for notification of deleted billings.
|
void |
registerForNewBillingAncestors(Id billingId)
Registers for notification of an updated hierarchy structure that
introduces a new ancestor of the specified billing.
|
void |
registerForNewBillingDescendants(Id billingId)
Registers for notification of an updated hierarchy structure that
introduces a new descendant of the specified billing.
|
void |
registerForNewBillings()
Register for notifications of new billings.
|
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 registerForNewBillings() throws OperationFailedException, PermissionDeniedException
BillingReceiver.newBilling()
is invoked when a new
Billing
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewBillingAncestors(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.newAncestorBilling()
is invoked when the
specified billing node gets a new ancestor.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 registerForNewBillingDescendants(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.newDescendantBilling()
is invoked when the
specified billing node gets a new descendant.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 registerForChangedBillings() throws OperationFailedException, PermissionDeniedException
BillingReceiver.changedBilling()
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.changedBilling()
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.deletedBilling()
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.deletedBilling()
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 registerForDeletedBillingAncestors(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.deletedAncestor()
is invoked when the
specified billing node loses an ancestor.billingId
- the Id
of the Billing
to monitorNullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedBillingDescendants(Id billingId) throws OperationFailedException, PermissionDeniedException
BillingReceiver.deletedDescendant()
is invoked when the
specified billing node loses a descendant.billingId
- the Id
of the Billing
to monitorNullArgumentException
- billingId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.