Class CloudFoundryAuthorizationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.springframework.boot.actuate.autoconfigure.cloudfoundry.CloudFoundryAuthorizationException
- All Implemented Interfaces:
Serializable
Authorization exceptions thrown to limit access to the endpoints.
- Since:
- 2.0.0
- Author:
- Madhura Bhave
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
Reasons why the exception can be thrown. -
Constructor Summary
ConstructorDescriptionCloudFoundryAuthorizationException
(CloudFoundryAuthorizationException.Reason reason, String message) CloudFoundryAuthorizationException
(CloudFoundryAuthorizationException.Reason reason, String message, Throwable cause) -
Method Summary
Modifier and TypeMethodDescriptionReturn the reason why the authorization exception was thrown.Return the status code that should be returned to the client.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
CloudFoundryAuthorizationException
public CloudFoundryAuthorizationException(CloudFoundryAuthorizationException.Reason reason, String message) -
CloudFoundryAuthorizationException
public CloudFoundryAuthorizationException(CloudFoundryAuthorizationException.Reason reason, String message, Throwable cause)
-
-
Method Details
-
getStatusCode
Return the status code that should be returned to the client.- Returns:
- the HTTP status code
-
getReason
Return the reason why the authorization exception was thrown.- Returns:
- the reason
-