title: How to make an arraylist remotely accessible
body: <p>I have a project where I am using Java RMI to make objects remotely accessible to other objects. I need to make the following class remote:</p>
  
  <pre><code>public interface MarketBB extends Remote
  {
     public ArrayList&lt;CloudEntry&gt; getMarketBB() throws RemoteException; 
     public void moveAMP(int fromCloud, int toCloud) throws RemoteException;
  }
  </code></pre>
  
  <p>The problem that I have is that because the ArrayList is holding CloudEntry objects, when the getMarketBB method is called from another object, nothing is returned.</p>
  
  <p>Is there a way of making the ArrayList of CloudEntry classes remotely accessible?</p>
  
  <p>Here is the code for the CloudEntry class:</p>
  
  <pre><code>public class CloudEntryImpl implements CloudEntry {
  
      int cloudId;
      String cloudName;
      double speedGHz;
      double costPerGhzH;
      double commsCost;
      double commsTime;
      int noAMPs;
  
      //constructor, get and set methods for fields
  
  }
  </code></pre>
  
  <p>And the CloudEntry interface:</p>
  
  <pre><code>public interface CloudEntry extends Remote {
  
      public void setNoAmps(int noAmps) throws RemoteException;
  
      public String getCloudName() throws RemoteException;
  
      public String getCloudDetails() throws RemoteException;
  
  }
  </code></pre>