public final class AtomicMarshalledInstance extends MarshalledInstance
ProxyAccessor
, but will replace any ProxyAccessor
references it contains.Constructor and Description |
---|
AtomicMarshalledInstance(MarshalledObject mo)
Creates a new
MarshalledInstance from an
existing MarshalledObject . |
AtomicMarshalledInstance(Object obj)
Creates a new
MarshalledInstance that contains the
marshalled representation of the current state of the supplied
object. |
AtomicMarshalledInstance(Object obj,
Collection context)
Creates a new
AtomicMarshalledInstance that contains the
marshalled representation of the current state of the supplied
object. |
Modifier and Type | Method and Description |
---|---|
protected MarshalFactory |
getMarshalFactory()
Sub classes implement this method to use alternative Serialization
frameworks to unmarshall data.
|
convertToMarshalledObject, equals, fullyEquals, get, get, hashCode, isNull
public AtomicMarshalledInstance(MarshalledObject mo)
MarshalledInstance
from an
existing MarshalledObject
. An object equivalent
to the object contained in the passed MarshalledObject
will be contained in the new AtomicMarshalledInstance
.
The object contained in the passed MarshalledObject
will not be unmarshalled as part of this call.
Note that an AtomicMarshalledInstance, converted to a MarshalledObject can be deserialized, without support for using atomic input validation. A MarshalledObject converted to an AtomicMarshalledObject can only be deserialized if it was originally created as an AtomicMarshalledInstance. This functionality only exists for backward compatibility reasons.
mo
- The MarshalledObject
that contains
the object the new MarshalledInstance
should
containNullPointerException
- if mo
is null
public AtomicMarshalledInstance(Object obj) throws IOException
MarshalledInstance
that contains the
marshalled representation of the current state of the supplied
object. The object is serialized with the semantics defined by
AtomicMarshalOutputStream
. The output stream used to marshal the
object implements ObjectStreamContext
and returns an empty
collection from its getObjectStreamContext
method.obj
- The Object to be contained in the new
MarshalledInstance
IOException
- if the object cannot be serializedpublic AtomicMarshalledInstance(Object obj, Collection context) throws IOException
AtomicMarshalledInstance
that contains the
marshalled representation of the current state of the supplied
object. The object is serialized with the semantics defined by
AtomicMarshalOutputStream
. The output stream used to marshal the
object implements ObjectStreamContext
and returns the given
collection from its getObjectStreamContext
method.obj
- The Object to be contained in the new
AtomicMarshalledInstance
context
- the collection of context information objectsIOException
- if the object cannot be serializedNullPointerException
- if context
is null
protected final MarshalFactory getMarshalFactory()
MarshalledInstance
getMarshalFactory
in class MarshalledInstance
Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.