I am currently having issue with the Serialization Policy from GWT:
This is the class in which GWT dislike: ClientServiceDescription
Code:
/** Simple container class which contains descriptions of running services. */
public class ClientServiceDescription implements Serializable {
private String status;
private String serviceId;
/**
* Get the status.
*
* @return Return the status.
*/
public String getStatus() {
return this.status;
}
/**
* Set the status.
*
* @param status The status to set.
*/
public void setStatus(final String status) {
this.status = status;
}
/**
* Get the serviceId.
*
* @return Return the serviceId.
*/
public String getServiceId() {
return this.serviceId;
}
/**
* Set the serviceId.
*
* @param serviceId The serviceId to set.
*/
public void setServiceId(final String serviceId) {
this.serviceId = serviceId;
}
/**
* To String method.
*
* @return str
*/
public String toString() {
return "[Service: " + this.getServiceId() + " Status:" + this.getStatus() + "]";
}
}
This is another class that holds a list of ClientServiceDescription:
Code:
/**
* <p>
* Client representation of the status of an EC2 node.
* </p>
*
* @author edwin.nathaniel
* @version $Revision:693 $
*/
public class ClientNodeStatus extends BaseModel implements Serializable {
private static final int FNGROUP = 0;
private static final int FIP = 1;
private static final int FID = 2;
private static final int FIMG = 3;
private static final int FIMGSZ = 4;
private static final int FLAUNCH = 5;
private static final int FSTATE = 6;
private static final int FSERVICES = 7;
private static final int FPUBDNS = 8;
private String[] properties = {
"nodeGroup", "ip", "instanceId", "image", "imageSize", "launchTime", "state", "services", "publicDns"
};
/**
* Get the NodeGroup this Node belongs to.
*
* @return cng
*/
public ClientNodeGroup getNodeGroup() {
return (ClientNodeGroup) this.get(this.properties[FNGROUP]);
}
/**
* Set the NodeGroup this Node belongs to.
*
* @param cng
*/
public void setNodeGroup(final ClientNodeGroup cng) {
this.set(this.properties[FNGROUP], cng);
}
/**
* Get the iP.
*
* @return Return the iP.
*/
public String getIp() {
return (String) this.get(this.properties[FIP]);
}
/**
* Set the iP.
*
* @param ip The iP to set.
*/
public void setIp(final String ip) {
this.set(this.properties[FIP], ip);
}
/**
* Get the instance id.
*
* @return Return the id.
*/
public String getInstanceId() {
return (String) this.get(this.properties[FID]);
}
/**
* Set the id.
*
* @param id The id to set.
*/
public void setInstanceId(final String id) {
this.set(this.properties[FID], id);
}
/**
* Get the image.
*
* @return Return the image.
*/
public String getImage() {
return (String) this.get(this.properties[FIMG]);
}
/**
* Set the image.
*
* @param image The image to set.
*/
public void setImage(final String image) {
this.set(this.properties[FIMG], image);
}
/**
* Get the imageSize.
*
* @return Return the imageSize.
*/
public String getImageSize() {
return (String) this.get(this.properties[FIMGSZ]);
}
/**
* Set the imageSize.
*
* @param imageSize The imageSize to set.
*/
public void setImageSize(final String imageSize) {
this.set(this.properties[FIMGSZ], imageSize);
}
/**
* Get the launchTime.
*
* @return Return the launchTime.
*/
public String getLaunchTime() {
return (String) this.get(this.properties[FLAUNCH]);
}
/**
* Set the launchTime.
*
* @param launchTime The launchTime to set.
*/
public void setLaunchTime(final String launchTime) {
this.set(this.properties[FLAUNCH], launchTime);
}
/**
* Get the state.
*
* @return Return the state.
*/
public String getState() {
return (String) this.get(this.properties[FSTATE]);
}
/**
* Set the state.
*
* @param state The state to set.
*/
public void setState(final String state) {
this.set(this.properties[FSTATE], state);
}
/**
* Get the services.
*
* @return Return the services.
*/
public List<ClientServiceDescription> getServices() {
return (List<ClientServiceDescription>) this.get(this.properties[FSERVICES]);
}
/**
* Set the services.
*
* @param services The services to set.
*/
public void setServices(final List<ClientServiceDescription> services) {
this.set(this.properties[FSERVICES], services);
}
/**
* Get the public DNS value.
*
* @return publicDns
*/
public String getPublicDns() {
return (String) this.get(this.properties[FPUBDNS]);
}
/**
* Set the public DNS value.
*
* @param pubDns
*/
public void setPublicDns(final String pubDns) {
this.set(this.properties[FPUBDNS], pubDns);
}
}
As far as I understand, GWT is happily to accept user-defined Java class.