Interface BankNotificationSession

All Superinterfaces:
AutoCloseable, Closeable, OsidSession, OsidSession

public interface BankNotificationSession extends OsidSession

This session defines methods to receive notifications on adds/changes to Bank 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.

  • Method Details

    • canRegisterForBankNotifications

      boolean canRegisterForBankNotifications()
      Tests if this user can register for Bank 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.
      Returns:
      false if notification methods are not authorized, true otherwise
      Compliance:
      mandatory - This method must be implemented.
    • reliableBankNotifications

      void reliableBankNotifications()
      Reliable notifications are desired. In reliable mode, notifications are to be acknowledged using acknowledgeBankNotification() .
      Compliance:
      mandatory - This method is must be implemented.
    • unreliableBankNotifications

      void unreliableBankNotifications()
      Unreliable notifications are desired. In unreliable mode, notifications do not need to be acknowledged.
      Compliance:
      mandatory - This method is must be implemented.
    • acknowledgeBankNotification

      void acknowledgeBankNotification(Id notificationId) throws OperationFailedException, PermissionDeniedException
      Acknowledge a bank notification.
      Parameters:
      notificationId - the Id of the notification
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForNewBanks

      void registerForNewBanks() throws OperationFailedException, PermissionDeniedException
      Register for notifications of new banks. BankReceiver.newBanks() is invoked when a new Bank is created.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBanks

      void registerForChangedBanks() throws OperationFailedException, PermissionDeniedException
      Registers for notification of updated banks. BankReceiver.changedBanks() is invoked when a bank is changed.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBank

      void registerForChangedBank(Id bankId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bank. BankReceiver.changedBanks() is invoked when the specified bank is changed.
      Parameters:
      bankId - the Id of the bank to monitor
      Throws:
      NullArgumentException - bankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedBanks

      void registerForDeletedBanks() throws OperationFailedException, PermissionDeniedException
      Registers for notification of deleted banks. BankReceiver.deletedBanks() is invoked when a bank is deleted.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForDeletedBank

      void registerForDeletedBank(Id bankId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of a deleted bank. BankReceiver.deletedBanks() is invoked when the specified bank is deleted.
      Parameters:
      bankId - the Id of the bank to monitor
      Throws:
      NullArgumentException - bankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure occurred
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBankHierarchy

      void registerForChangedBankHierarchy() throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bank hierarchy structure. BankReceiver.changedChildOfBanks() is invoked when a node experiences a change in its children.
      Throws:
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBankHierarchyForAncestors

      void registerForChangedBankHierarchyForAncestors(Id bankId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bank hierarchy structure. BankReceiver.changedChildOfBanks() is invoked when the specified node or any of its ancestors experiences a change in its children.
      Parameters:
      bankId - the Id of the Bank node to monitor
      Throws:
      NullArgumentException - bankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.
    • registerForChangedBankHierarchyForDescendants

      void registerForChangedBankHierarchyForDescendants(Id bankId) throws OperationFailedException, PermissionDeniedException
      Registers for notification of an updated bank hierarchy structure. BankReceiver.changedChildOfBanks() is invoked when the specified node or any of its descendants experiences a change in its children.
      Parameters:
      bankId - the Id of the Bank node to monitor
      Throws:
      NullArgumentException - bankId is null
      OperationFailedException - unable to complete request
      PermissionDeniedException - authorization failure
      Compliance:
      mandatory - This method must be implemented.