- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.shredzone.acme4j.exception.AcmeLazyLoadingException
-
- All Implemented Interfaces:
Serializable
public class AcmeLazyLoadingException extends RuntimeException
A runtime exception that is thrown when anAcmeException
occured while trying to lazy-load a resource from the ACME server. It contains the original cause of the exception and a reference to the resource that could not be lazy-loaded. It is usually thrown by getter methods, so the API is not polluted with checked exceptions.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AcmeLazyLoadingException(Class<? extends AcmeResource> type, URL location, AcmeException cause)
Creates a newAcmeLazyLoadingException
.AcmeLazyLoadingException(AcmeResource resource, AcmeException cause)
Creates a newAcmeLazyLoadingException
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description URL
getLocation()
Returns the location of the resource that could not be loaded.Class<? extends AcmeResource>
getType()
Returns theAcmeResource
type of the resource that could not be loaded.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
AcmeLazyLoadingException
public AcmeLazyLoadingException(AcmeResource resource, AcmeException cause)
Creates a newAcmeLazyLoadingException
.- Parameters:
resource
-AcmeResource
to be loadedcause
-AcmeException
that was raised
-
AcmeLazyLoadingException
public AcmeLazyLoadingException(Class<? extends AcmeResource> type, URL location, AcmeException cause)
Creates a newAcmeLazyLoadingException
.This constructor is used if there is no actual instance of the resource.
- Parameters:
type
-AcmeResource
type to be loadedlocation
- Resource locationcause
-AcmeException
that was raised- Since:
- 2.8
-
-
Method Detail
-
getType
public Class<? extends AcmeResource> getType()
Returns theAcmeResource
type of the resource that could not be loaded.
-
getLocation
public URL getLocation()
Returns the location of the resource that could not be loaded.
-
-