java - How to make an arraylist remotely accessible -


i have project using java rmi make objects remotely accessible other objects. need make following class remote:

public interface marketbb extends remote {    public arraylist<cloudentry> getmarketbb() throws remoteexception;     public void moveamp(int fromcloud, int tocloud) throws remoteexception; } 

the problem have because arraylist holding cloudentry objects, when getmarketbb method called object, nothing returned.

is there way of making arraylist of cloudentry classes remotely accessible?

here code cloudentry class:

public class cloudentryimpl implements cloudentry {      int cloudid;     string cloudname;     double speedghz;     double costperghzh;     double commscost;     double commstime;     int noamps;      //constructor, , set methods fields  } 

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;  } 

your cloudentryimpl not serializable. try changing to:

public class cloudentryimpl extends unicastremoteobject implements cloudentry {     //... } 

Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -