Class RemoteProperties

  • All Implemented Interfaces:
    Serializable

    public class RemoteProperties
    extends Object
    implements Serializable
    A container for the information marshalled/serialized by a RemoteException. That information is encapsulated in a container, instead of being marshalled/serialized as individual properties of RemoteException, so that the exception may perform post-processing after all component properties below are set.

    The stack trace capture is a string array, containing the individual lines of the receiver's throwable stack trace printing: the first string is usually the exception class and message, and the remaining strings represent individual frames in the unravelled stack.

    Equality and hash code generation ignore the receiver's throwable, its wrapper, and its class name.

    Since:
    1.0.0
    Version:
    $Id: RemoteProperties.java 16154 2012-07-14 16:34:05Z colin $
    Author:
    tlerios@marketcetera.com
    See Also:
    Serialized Form
    • Constructor Detail

      • RemoteProperties

        public RemoteProperties​(Throwable throwable)
        Creates a new container for a RemoteException that wraps the given throwable.
        Parameters:
        throwable - The throwable, which may be null.
      • RemoteProperties

        public RemoteProperties()
        Creates a new container. This empty constructor is intended for use by JAXB and Java serialization. It must be public because a non-public one does not work for classes that are marshalled by JAXB as part of an exception.
    • Method Detail

      • setTransientThrowable

        private void setTransientThrowable​(Throwable throwable)
        Sets the receiver's throwable to the given one.
        Parameters:
        throwable - The throwable, which may be null.
      • getTransientThrowable

        private Throwable getTransientThrowable()
        Returns the receiver's throwable.
        Returns:
        The throwable, which may be null.
      • setWrapper

        public void setWrapper​(SerWrapper<Throwable> wrapper)
        Set the receiver's throwable (wrapper) to the given one.
        Parameters:
        wrapper - The throwable (wrapper), which may be null.
      • getWrapper

        public SerWrapper<Throwable> getWrapper()
        Returns the receiver's throwable (wrapper).
        Returns:
        The throwable (wrapper), which may be null.
      • setTraceCapture

        public void setTraceCapture​(String[] traceCapture)
        Set the receiver's stack trace capture to the given one.
        Parameters:
        traceCapture - The capture, which may be null.
      • getTraceCapture

        public String[] getTraceCapture()
        Returns the receiver's stack trace capture.
        Returns:
        The capture, which may be null.
      • setServerMessage

        public void setServerMessage​(String serverMessage)
        Sets the receiver's server-localized message to the given one.
        Parameters:
        serverMessage - The message, which may be null.
      • getServerMessage

        public String getServerMessage()
        Returns the receiver's server-localized message.
        Returns:
        The message, which may be null.
      • setServerString

        public void setServerString​(String serverString)
        Sets the receiver's server string representation to the given one.
        Parameters:
        serverString - The string, which may be null.
      • getServerString

        public String getServerString()
        Returns the receiver's server string representation.
        Returns:
        The string, which may be null.
      • setServerName

        public void setServerName​(String serverName)
        Sets the receiver's server class name to the given one.
        Parameters:
        serverName - The name, which may be null.
      • getServerName

        public String getServerName()
        Returns the receiver's server class name.
        Returns:
        The name, which may be null.
      • getThrowable

        public Throwable getThrowable()
        Returns a best-effort reconstruction of the receiver's throwable, as described in RemoteException.
        Returns:
        The throwable, which may be null.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object