org.cocome.tradingsystem.external.impl
Class BankImpl

java.lang.Object
  extended by java.rmi.server.RemoteObject
      extended by java.rmi.server.RemoteServer
          extended by java.rmi.server.UnicastRemoteObject
              extended by org.cocome.tradingsystem.external.impl.BankImpl
All Implemented Interfaces:
java.io.Serializable, java.rmi.Remote, Bank

public class BankImpl
extends java.rmi.server.UnicastRemoteObject
implements Bank

Very basic implementation of the bank

Author:
Yannick Welsch
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.server.RemoteObject
ref
 
Constructor Summary
BankImpl()
           
 
Method Summary
 Debit debitCard(TransactionID id)
          Used to debit an bank account
static void main(java.lang.String[] args)
           
 TransactionID validateCard(java.lang.String cardInformation, int cardnumber)
          Used to validate a credit card
 
Methods inherited from class java.rmi.server.UnicastRemoteObject
clone, exportObject, exportObject, exportObject, unexportObject
 
Methods inherited from class java.rmi.server.RemoteServer
getClientHost, getLog, setLog
 
Methods inherited from class java.rmi.server.RemoteObject
equals, getRef, hashCode, toString, toStub
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BankImpl

public BankImpl()
         throws java.rmi.RemoteException
Throws:
java.rmi.RemoteException
Method Detail

debitCard

public Debit debitCard(TransactionID id)
Description copied from interface: Bank
Used to debit an bank account

Specified by:
debitCard in interface Bank
Parameters:
id - The corresponding TransactionID
Returns:

validateCard

public TransactionID validateCard(java.lang.String cardInformation,
                                  int cardnumber)
Description copied from interface: Bank
Used to validate a credit card

Specified by:
validateCard in interface Bank
Returns:

main

public static void main(java.lang.String[] args)
                 throws java.rmi.RemoteException,
                        java.lang.InterruptedException
Throws:
java.rmi.RemoteException
java.lang.InterruptedException