Interface SerializableProxy

  • All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    DefaultSerializableProxy

    public interface SerializableProxy
    extends Serializable
    Serialized representation of a proxy. When a proxy that is using a SerializableProxy is serialized it is serialized via the following mechanism:
     Object writeReplace() throws ObjectStreamException {
         SerializableProxy proxy = serializableClass.newInstance();
         proxy.setProxyInstance(this);
         return proxy;
     }
     

    Implementors of this interface should store any state that is required to re-create the proxy in this class's serialized form. Implementors also *MUST* implement an Object readResolve() throws ObjectStreamException method, the returns the de-serialized proxy.

    Author:
    Stuart Douglas
    See Also:
    DefaultSerializableProxy
    • Method Detail

      • setProxyInstance

        void setProxyInstance​(Object proxy)
        Set the proxy instance.
        Parameters:
        proxy - the proxy instance