net.derquinse.common.test
Class HessianSerializabilityTests

java.lang.Object
  extended by net.derquinse.common.test.HessianSerializabilityTests

public final class HessianSerializabilityTests
extends Object

Hessian serializability support methods.

Author:
Andres Rodriguez

Method Summary
static void both(Serializable obj)
          Checks serializability of one object and equality of the provided instance and the deserialized one using both Hessian 1 and 2.
static void both(Serializable obj, boolean equality)
          Checks serializability of one object and (if desired) equality of the provided instance and the deserialized one using both Hessian 1 and 2.
static
<T extends Serializable>
T
hessian1(T obj)
          Checks serializability of one object and equality of the provided instance and the deserialized one using Hessian 1.
static
<T extends Serializable>
T
hessian1(T obj, boolean equality)
          Checks serializability of one object and (if desired) equality of the provided instance and the deserialized one using Hessian 1.
static
<T extends Serializable>
T
hessian2(T obj)
          Checks serializability of one object and equality of the provided instance and the deserialized one using Hessian 2.
static
<T extends Serializable>
T
hessian2(T obj, boolean equality)
          Checks serializability of one object and (if desired) equality of the provided instance and the deserialized one using Hessian 2.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

hessian1

public static <T extends Serializable> T hessian1(T obj,
                                                  boolean equality)
                                       throws UnableToSerializeException
Checks serializability of one object and (if desired) equality of the provided instance and the deserialized one using Hessian 1.

Parameters:
obj - Object to test.
equality - Whether to test for equality.
Returns:
The deserialized instance.
Throws:
UnableToSerializeException
See Also:
EqualityTests#two(Object, Object)}

hessian1

public static <T extends Serializable> T hessian1(T obj)
                                       throws UnableToSerializeException
Checks serializability of one object and equality of the provided instance and the deserialized one using Hessian 1.

Parameters:
obj - Object to test.
Returns:
The deserialized instance.
Throws:
UnableToSerializeException
See Also:
EqualityTests#two(Object, Object)}

hessian2

public static <T extends Serializable> T hessian2(T obj,
                                                  boolean equality)
                                       throws UnableToSerializeException
Checks serializability of one object and (if desired) equality of the provided instance and the deserialized one using Hessian 2.

Parameters:
obj - Object to test.
equality - Whether to test for equality.
Returns:
The deserialized instance.
Throws:
UnableToSerializeException
See Also:
EqualityTests#two(Object, Object)}

hessian2

public static <T extends Serializable> T hessian2(T obj)
                                       throws UnableToSerializeException
Checks serializability of one object and equality of the provided instance and the deserialized one using Hessian 2.

Parameters:
obj - Object to test.
Returns:
The deserialized instance.
Throws:
UnableToSerializeException
See Also:
EqualityTests#two(Object, Object)}

both

public static void both(Serializable obj,
                        boolean equality)
                 throws UnableToSerializeException
Checks serializability of one object and (if desired) equality of the provided instance and the deserialized one using both Hessian 1 and 2.

Parameters:
obj - Object to test.
equality - Whether to test for equality.
Throws:
UnableToSerializeException
See Also:
EqualityTests#two(Object, Object)}

both

public static void both(Serializable obj)
                 throws UnableToSerializeException
Checks serializability of one object and equality of the provided instance and the deserialized one using both Hessian 1 and 2.

Parameters:
obj - Object to test.
Throws:
UnableToSerializeException
See Also:
EqualityTests#two(Object, Object)}


Copyright © 2012. All Rights Reserved.