Class ResteasyServiceUnavailableException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
jakarta.ws.rs.WebApplicationException
jakarta.ws.rs.ServerErrorException
jakarta.ws.rs.ServiceUnavailableException
org.jboss.resteasy.client.exception.ResteasyServiceUnavailableException
- All Implemented Interfaces:
Serializable,WebApplicationExceptionWrapper<ServiceUnavailableException>
public class ResteasyServiceUnavailableException
extends ServiceUnavailableException
implements WebApplicationExceptionWrapper<ServiceUnavailableException>
Wraps a
ServiceUnavailableException with a sanitized response.- Author:
- James R. Perkins
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiongetRetryTime(Date requestTime) Get the retry time for the failed request.booleanCheck if the underlying response contains the information on when is it possible toHttpHeaders.RETRY_AFTERretry the request.unwrap()Returns the original, unwrapped, exception.Methods inherited from class jakarta.ws.rs.WebApplicationException
getResponseMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
hasRetryAfter
public boolean hasRetryAfter()Description copied from class:ServiceUnavailableExceptionCheck if the underlying response contains the information on when is it possible toHttpHeaders.RETRY_AFTERretry the request.- Overrides:
hasRetryAfterin classServiceUnavailableException- Returns:
truein case the retry time is specified in the underlying response,falseotherwise.
-
getRetryTime
Description copied from class:ServiceUnavailableExceptionGet the retry time for the failed request.- Overrides:
getRetryTimein classServiceUnavailableException- Parameters:
requestTime- time of sending the original request that may be used to compute the retry time (in case the retry time information specified as a decimal interval in seconds).- Returns:
- time when the request may be retried or
nullif there is no retry information available.
-
unwrap
Description copied from interface:WebApplicationExceptionWrapperReturns the original, unwrapped, exception.- Specified by:
unwrapin interfaceWebApplicationExceptionWrapper<ServiceUnavailableException>- Returns:
- the original exception
-