jgroup.test.jini.txn
Interface Bank

All Superinterfaces:
jgroup.core.ExternalGMIListener, java.rmi.Remote
All Known Implementing Classes:
NonReplicatedBankServer, NonReplicatedBankServer2, PassiveReplicatedBankServer, PassiveReplicatedBankServer2, ReplicatedBankServer, ReplicatedBankServer2

public interface Bank
extends jgroup.core.ExternalGMIListener

Remote interface for the bank services.

Author:
Rohnny Moland

Method Summary
 void deposit(long accountNumber, int amount, long transactionID)
          Do a deposit operation on given account.
 java.lang.Integer getBalance(long accNumber)
          Get balance of an account.
 java.lang.String getName()
          Get the name of a bank service.
 void withdraw(long accountNumber, int amount, long transactionID)
          Do a withdraw operation on given account.
 

Method Detail

getBalance

java.lang.Integer getBalance(long accNumber)
                             throws java.rmi.RemoteException
Get balance of an account.

Parameters:
accNumber - Account number
Returns:
the balance of the account
Throws:
java.rmi.RemoteException

withdraw

void withdraw(long accountNumber,
              int amount,
              long transactionID)
              throws java.rmi.RemoteException
Do a withdraw operation on given account.

Parameters:
accountNumber - The account number to use
amount - The amount to withdraw
transactionID - The transaction id to use
Throws:
java.rmi.RemoteException

deposit

void deposit(long accountNumber,
             int amount,
             long transactionID)
             throws java.rmi.RemoteException
Do a deposit operation on given account.

Parameters:
accountNumber - The account number to use
amount - The amount to deposit
txn - The transaction id to use
Throws:
java.rmi.RemoteException

getName

java.lang.String getName()
                         throws java.rmi.RemoteException
Get the name of a bank service.

Returns:
Name of bank
Throws:
java.rmi.RemoteException


Copyright © 1998-2006 The Jgroup/ARM development team. All Rights Reserved.