|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.marketcetera.util.ws.wrappers.BaseWrapper<R>
org.marketcetera.util.ws.wrappers.DualWrapper<T,byte[]>
org.marketcetera.util.ws.wrappers.SerWrapper<T>
public class SerWrapper<T extends Serializable>
A dual-form wrapper for marshalling a serializable object. The raw
form is an object implementing Serializable, and the
marshalled form is a byte array.
This wrapper is itself Java serializable and
JAXB-marshallable. Its own deserialization/unmarshalling succeeds
without an exception even if the wrapped object cannot be
deserialized, in which case the wrapper contains a null value for
the wrapped object's raw and marshalled forms, logs a warning, and
getDeserializationException() returns the exception thrown
during deserialization. Similarly, its own
serialization/marshalling succeeds without an exception even if the
wrapped object cannot be serialized, in which case the wrapper
contains a null value for the wrapped object's raw and marshalled
forms, logs a warning, and getSerializationException()
returns the exception thrown during serialization.
| Constructor Summary | |
|---|---|
SerWrapper()
Creates a new wrapper. |
|
SerWrapper(T raw)
Creates a new wrapper for the given object, in its raw form. |
|
| Method Summary | |
|---|---|
org.apache.commons.lang.SerializationException |
getDeserializationException()
Returns the exception encountered during the most recent deserialization attempt; it is null if that attempt was successful, or no attempt has been made yet. |
org.apache.commons.lang.SerializationException |
getSerializationException()
Returns the exception encountered during the most recent serialization attempt; it is null if that attempt was successful, or no attempt has been made yet. |
protected void |
toMarshalled()
Sets the marshalled form of the receiver's value so that it corresponds to its raw form. |
protected void |
toRaw()
Sets the raw form of the receiver's value so that it corresponds to its marshalled form. |
| Methods inherited from class org.marketcetera.util.ws.wrappers.DualWrapper |
|---|
getMarshalled, getRaw, readExternal, setMarshalled, setMarshalledOnly, setRaw, setRawOnly, writeExternal |
| Methods inherited from class org.marketcetera.util.ws.wrappers.BaseWrapper |
|---|
equals, getValue, hashCode, setValue, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SerWrapper(T raw)
raw - The object, which may be null.public SerWrapper()
| Method Detail |
|---|
public org.apache.commons.lang.SerializationException getSerializationException()
public org.apache.commons.lang.SerializationException getDeserializationException()
protected void toRaw()
DualWrapperDualWrapper.setRawOnly(Object) and
DualWrapper.setMarshalledOnly(Object) should be used in
setting either form, to prevent infinite recursion. The raw
form is null if and only if the marshalled one is null; the
caller of this method will enforce this invariant, so the
subclass implementation can set just the raw form to null.
toRaw in class DualWrapper<T extends Serializable,byte[]>protected void toMarshalled()
DualWrapperDualWrapper.setRawOnly(Object) and
DualWrapper.setMarshalledOnly(Object) should be used in setting
either form, to prevent infinite recursion. The raw form is
null if and only if the marshalled one is null; the caller of
this method will enforce this invariant, so the subclass
implementation can set just the marshalled form to null.
toMarshalled in class DualWrapper<T extends Serializable,byte[]>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||