public interface CreditNotificationSession extends OsidSession
This session defines methods to receive notifications on adds/changes
to Credit
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.
Modifier and Type | Method and Description |
---|---|
void |
acknowledgeCreditNotification(Id notificationId)
Acknowledge a credit notification.
|
boolean |
canRegisterForCreditNotifications()
Tests if this user can register for
Credit
notifications. |
Billing |
getBilling()
Gets the
Billing associated with this session. |
Id |
getBillingId()
Gets the
Billing Id associated with this
session. |
void |
registerForChangedCredit(Id creditId)
Registers for notification of an updated credit.
|
void |
registerForChangedCredits()
Registers for notification of updated credits.
|
void |
registerForChangedCreditsByGenusType(Type creditGenusType)
Register for notifications of changed credits by the given credit
gfenus
Type. |
void |
registerForChangedCreditsForReference(Id referenceId)
Register for notifications of changed credits for the given reference
Id. |
void |
registerForChangedCreditsForResource(Id resourceId)
Register for notifications of changed credits for the given resource
Id. |
void |
registerForDeletedCredit(Id creditId)
Registers for notification of a deleted credit.
|
void |
registerForDeletedCredits()
Registers for notification of deleted credits.
|
void |
registerForDeletedCreditsByGenusType(Type creditGenusType)
Register for notifications of deleted credits by the credit genus
Type. |
void |
registerForDeletedCreditsForReference(Id referenceId)
Register for notifications of deleted credits for the given reference
Id. |
void |
registerForDeletedCreditsForResource(Id resourceId)
Register for notifications of deleted credits for the given resource
Id. |
void |
registerForNewCredits()
Register for notifications of new credits.
|
void |
registerForNewCreditsByGenusType(Type creditGenusType)
Register for notifications of new credits by the given credit genus
Type. |
void |
registerForNewCreditsForReference(Id referenceId)
Register for notifications of new credits for the given reference
Id. |
void |
registerForNewCreditsForResource(Id resourceId)
Register for notifications of new credits for the given resource
Id. |
void |
reliableCreditNotifications()
Reliable notifications are desired.
|
void |
unreliableCreditNotifications()
Unreliable notifications are desired.
|
void |
useFederatedBillingView()
Federates the view for methods in this session.
|
void |
useIsolatedBillingView()
Isolates the view for methods in this session.
|
getAuthenticatedAgent, getAuthenticatedAgentId, getClockRate, getDate, getEffectiveAgent, getEffectiveAgentId, getFormatType, getLocale, isAuthenticated, startTransaction, supportsTransactions
close
Id getBillingId()
Billing
Id
associated with this
session. Billing Id
associated with this sessionmandatory
- This method must be implemented. Billing getBilling() throws OperationFailedException, PermissionDeniedException
Billing
associated with this session.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. boolean canRegisterForCreditNotifications()
Credit
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 useFederatedBillingView()
mandatory
- This method is must be implemented. void useIsolatedBillingView()
mandatory
- This method is must be implemented. void reliableCreditNotifications()
acknowledgeCreditNotification()
.mandatory
- This method is must be implemented. void unreliableCreditNotifications()
mandatory
- This method is must be implemented. void acknowledgeCreditNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
notificationId
- the Id
of the notificationOperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCredits() throws OperationFailedException, PermissionDeniedException
CreditReceiver.newCredits()
is invoked when a new
Credit
is created.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCreditsByGenusType(Type creditGenusType) throws OperationFailedException, PermissionDeniedException
Type.
CreditReceiver.newCredits()
is
invoked when a new Credit
appears in this billing.creditGenusType
- the Id
of the reference to
monitorNullArgumentException
- creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCreditsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id.
CreditReceiver.newCredits()
is
invoked when a new Credit
appears in this billing.referenceId
- the reference to monitorNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForNewCreditsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
CreditReceiver.newCredits()
is
invoked when a new Credit
appears in this billing.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCredits() throws OperationFailedException, PermissionDeniedException
CreditReceiver.changedCredits()
is invoked when a credit in
this billing is changed.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCreditsByGenusType(Type creditGenusType) throws OperationFailedException, PermissionDeniedException
Type.
CreditReceiver.changedCredits()
is invoked when a Credit
for the reference in
this billing is changed.creditGenusType
- the genus type of the credit to monitorNullArgumentException
- creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCreditsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id.
CreditReceiver.changedCredits()
is
invoked when a Credit
for the reference in this billing
is changed.referenceId
- the Id
of the reference to monitorNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCreditsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
CreditReceiver.changedCredits()
is
invoked when a Credit
for the resource is changed in
this billing.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForChangedCredit(Id creditId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CreditReceiver.changedCredits()
is invoked when the specified
credit in this billing is changed.creditId
- the Id
of the Credit
to
monitorNotFoundException
- a credit was not found identified
by the given Id
NullArgumentException
- creditId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCredits() throws OperationFailedException, PermissionDeniedException
CreditReceiver.deletedCredit()
is invoked when a credit is
removed from this billing.OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCreditsByGenusType(Type creditGenusType) throws OperationFailedException, PermissionDeniedException
Type.
CreditReceiver.deletedCredit()
is
invoked when a Credit
for the reference is removed from
this billing.creditGenusType
- the genus type of the credit to monitorNullArgumentException
- creditGenusType
is null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCreditsForReference(Id referenceId) throws OperationFailedException, PermissionDeniedException
Id.
CreditReceiver.deletedCredit()
is
invoked when a Credit
for the reference is removed from
this billing.referenceId
- the Id
of the reference to monitorNullArgumentException
- referenceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCreditsForResource(Id resourceId) throws OperationFailedException, PermissionDeniedException
Id.
CreditReceiver.deletedCredit()
is
invoked when a Credit
for the resource is removed from
this billing.resourceId
- the Id
of the resource to monitorNullArgumentException
- resourceId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented. void registerForDeletedCredit(Id creditId) throws NotFoundException, OperationFailedException, PermissionDeniedException
CreditReceiver.deletedCredit()
is invoked when the specified
credit is removed from this billing.creditId
- the Id
of the Credit
to
monitorNotFoundException
- a credit was not found identified
by the given Id
NullArgumentException
- creditId
is
null
OperationFailedException
- unable to complete requestPermissionDeniedException
- authorization failuremandatory
- This method must be implemented.