Class RemoteException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.marketcetera.util.ws.wrappers.RemoteException
-
- All Implemented Interfaces:
Externalizable,Serializable
public class RemoteException extends Exception implements Externalizable
A remote exception. It wraps anyThrowablein a manner that enables its marshalling using JAXB in the context of web service faults, or for use by Java serialization in other contexts; this is done by serializing the throwable and marshalling it using aSerWrapper. On the server side, this class sets the wrapped throwable as its cause. This also happens on the client side, provided the client runs in a JVM which is able to deserialize the throwable (because it has the right resources and classes available in its classpath). Otherwise, the cause is an instance ofRemoteProxyException, which encapsulates the throwable's most important information, as conveyed via aRemotePropertiesinstance.Equality and hash code generation rely only on a temporary
RemotePropertiesinstance created for comparison purposes from the receiver's cause; notably, the class of the cause is ignored.- Since:
- 1.0.0
- Version:
- $Id: RemoteException.java 17411 2017-04-28 14:50:38Z colin $
- Author:
- tlerios@marketcetera.com
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private RemotePropertiesmPropertiesprivate static longserialVersionUID
-
Constructor Summary
Constructors Constructor Description RemoteException()Creates a new exception.RemoteException(Throwable t)Creates a new exception that wraps the given throwable.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)RemotePropertiesgetProperties()Returns the receiver's properties.inthashCode()voidreadExternal(ObjectInput in)voidsetProperties(RemoteProperties properties)Set the receiver's properties to the given ones.voidwriteExternal(ObjectOutput out)-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
mProperties
private RemoteProperties mProperties
-
-
Constructor Detail
-
RemoteException
public RemoteException(Throwable t)
Creates a new exception that wraps the given throwable.- Parameters:
t- The throwable, which may be null.
-
RemoteException
public RemoteException()
Creates a new exception. This empty constructor is intended for use by JAXB and Java serialization.
-
-
Method Detail
-
setProperties
public void setProperties(RemoteProperties properties)
Set the receiver's properties to the given ones. This method can only be called once with a non-null argument because a side effect is that it sets the receiver's cause based on its non-null argument.- Parameters:
properties- The properties, which may be null.
-
getProperties
public RemoteProperties getProperties()
Returns the receiver's properties.- Returns:
- The properties, which may be null.
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
-