SMILA 1.0 API documentation

org.eclipse.smila.utils
Class MaybeRecoverableException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.eclipse.smila.utils.MaybeRecoverableException
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
BulkbuilderException, ConnectivityException, DeltaException, JobManagerException, ProcessingException, StateException, VisitedLinksException, WebCrawlerException

public class MaybeRecoverableException
extends java.lang.Exception

base class for exception that have an isRecoverable flag. If the flag is true, it means that the exception condition is probably not permanent and the caller is encouraged to retry the request, maybe after a short delay time. Examples for such reasons could be external resources that are currently not reachable, network problems and similar. Non-recoverable are invalid arguments, parse errors, external resources that really do not exists, etc.

See Also:
Serialized Form

Constructor Summary
MaybeRecoverableException(java.lang.String message)
          create exception.
MaybeRecoverableException(java.lang.String message, boolean recoverable)
          create exception, recoverable flag explicitly defined.
MaybeRecoverableException(java.lang.String message, java.lang.Throwable cause)
          create exception.
MaybeRecoverableException(java.lang.String message, java.lang.Throwable cause, boolean recoverable)
          create exception, recoverable flag explicitly defined.
MaybeRecoverableException(java.lang.Throwable cause)
          create exception.
MaybeRecoverableException(java.lang.Throwable cause, boolean recoverable)
          create exception, recoverable flag explicitly defined.
 
Method Summary
 boolean isRecoverable()
           
static boolean isRecoverableCause(java.lang.Throwable cause)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, 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

MaybeRecoverableException

public MaybeRecoverableException(java.lang.String message,
                                 java.lang.Throwable cause)
create exception. recoverable flag is inherited from cause, if cause is a MaybeRecoverableException, too. Else the flag is set to false.


MaybeRecoverableException

public MaybeRecoverableException(java.lang.String message)
create exception. recoverable flag is set to false.


MaybeRecoverableException

public MaybeRecoverableException(java.lang.Throwable cause)
create exception. recoverable flag is inherited from cause, if cause is a MaybeRecoverableException, too. Else the flag is set to false.


MaybeRecoverableException

public MaybeRecoverableException(java.lang.String message,
                                 java.lang.Throwable cause,
                                 boolean recoverable)
create exception, recoverable flag explicitly defined.


MaybeRecoverableException

public MaybeRecoverableException(java.lang.String message,
                                 boolean recoverable)
create exception, recoverable flag explicitly defined.


MaybeRecoverableException

public MaybeRecoverableException(java.lang.Throwable cause,
                                 boolean recoverable)
create exception, recoverable flag explicitly defined.

Method Detail

isRecoverableCause

public static boolean isRecoverableCause(java.lang.Throwable cause)
Returns:
if cause is a MaybeRecoverableException, too, return it's recoverable flag. else false.

isRecoverable

public boolean isRecoverable()
Returns:
true if is useful for the client to retry the operation.

SMILA 1.0 API documentation