I have a project in which I use Java RMI to make objects remotely accessible to other objects. I need to make the following class pool:
public interface MarketBB extends Remote
{
public ArrayList<CloudEntry> getMarketBB() throws RemoteException;
public void moveAMP(int fromCloud, int toCloud) throws RemoteException;
}
The problem is that since ArrayList supports CloudEntry objects, when the getMarketBB method is called from another object, nothing is returned.
Is there a way to make access to the ArrayList CloudEntry classes available?
Here is the code for the CloudEntry class:
public class CloudEntryImpl implements CloudEntry {
int cloudId;
String cloudName;
double speedGHz;
double costPerGhzH;
double commsCost;
double commsTime;
int noAMPs;
}
And CloudEntry interface:
public interface CloudEntry extends Remote {
public void setNoAmps(int noAmps) throws RemoteException;
public String getCloudName() throws RemoteException;
public String getCloudDetails() throws RemoteException;
}
source
share