What is required of a class used as an entry or attribute?
Created May 4, 2012
Tim Rohaly
Attributes must conform to some strict rules:
- Must implement net.jini.core.entry.Entry (which itself extends Serializable)
- Must have only public instance variables (transient, final, static, and non-public variables will not be serialized)
- All instance variables must be references to serializable objects, primitive types are not allowed
- Must have a public, no-argument constructor
An IllegalArgumentException will be thrown during serialization if the attribute has a non-object instance variable or lacks a no-argument constructor.