/*
* This example is from the book "Java Enterprise in a Nutshell".
* Copyright (c) 1999 by O'Reilly & Associates.
* You may distribute this source code for non-commercial purposes only.
* You may study, modify, and use this example for any purpose, as long as
* this notice is retained. Note that this example is provided "as is",
* WITHOUT WARRANTY of any kind either expressed or implied.
*/
import java.rmi.Remote;
import java.rmi.RemoteException;
import java.util.List;
/**
* Account: A simple RMI interface that represents a banking account
* of some kind.
*
* Example 3-1, Java Enterprise in a Nutshell, 1st ed.
* Author: Jim Farley
*/
public interface Account extends java.rmi.Remote {
// Get the name on the account
public String getName() throws RemoteException;
// Get current balance
public float getBalance() throws RemoteException;
// Take some money away
public void withdraw(float amt) throws RemoteException;
// Put some money in
public void deposit(float amt) throws RemoteException;
// Move some money from one account into this one
public void transfer(float amt, Account src) throws RemoteException;
// Make a number of transfers from other accounts into this one
public void transfer(List amts, List srcs) throws RemoteException;
}
|