org.gcube.common.core.faults
Class GCUBEException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by java.io.IOException
              extended by java.rmi.RemoteException
                  extended by org.gcube.common.core.faults.GCUBEException
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
GCUBERetryEquivalentException, GCUBERetrySameException, GCUBEUnrecoverableException

public abstract class GCUBEException
extends RemoteException

Root of all exceptions with GCUBE semantics.

Author:
Fabio Simeoni (University of Strathclyde)
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.rmi.RemoteException
detail
 
Constructor Summary
GCUBEException()
          Creates an exception with a no message and no cause.
GCUBEException(String msg)
          Creates an exception with a given message.
GCUBEException(String msg, Throwable cause)
          Creates an exception with a given message and cause.
GCUBEException(Throwable cause)
          Create an exception with a given cause.
 
Method Summary
abstract  GCUBEFault getFault()
          Returns a stub object of the remote fault class which corresponds to the exception.
 GCUBEFault toFault(String... msg)
          Converts the exception into a corresponding remote fault.
 
Methods inherited from class java.rmi.RemoteException
getCause, getMessage
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GCUBEException

public GCUBEException()
Creates an exception with a no message and no cause.


GCUBEException

public GCUBEException(String msg,
                      Throwable cause)
Creates an exception with a given message and cause.

Parameters:
msg - the message.
cause - the cause.

GCUBEException

public GCUBEException(String msg)
Creates an exception with a given message.

Parameters:
msg - the message.

GCUBEException

public GCUBEException(Throwable cause)
Create an exception with a given cause.

Parameters:
cause - the cause.
Method Detail

getFault

public abstract GCUBEFault getFault()
Returns a stub object of the remote fault class which corresponds to the exception.

Returns:
the stub object.

toFault

public GCUBEFault toFault(String... msg)
Converts the exception into a corresponding remote fault.

Parameters:
msg - an optional message specific to the new fault.
Returns:
the fault.


Copyright © 2013. All Rights Reserved.