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
public class CloudFoundryAuthorizationException extends RuntimeException
Authorization exceptions thrown to limit access to the endpoints.- Since:
- 2.0.0
- See Also:
- Serialized Form
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CloudFoundryAuthorizationException.Reason
Reasons why the exception can be thrown.
Constructor Summary
Constructors Constructor Description CloudFoundryAuthorizationException(CloudFoundryAuthorizationException.Reason reason, String message)
CloudFoundryAuthorizationException(CloudFoundryAuthorizationException.Reason reason, String message, Throwable cause)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CloudFoundryAuthorizationException.Reason
getReason()
Return the reason why the authorization exception was thrown.org.springframework.http.HttpStatus
getStatusCode()
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 Detail
CloudFoundryAuthorizationException
public CloudFoundryAuthorizationException(CloudFoundryAuthorizationException.Reason reason, String message)
CloudFoundryAuthorizationException
public CloudFoundryAuthorizationException(CloudFoundryAuthorizationException.Reason reason, String message, Throwable cause)
Method Detail
getStatusCode
public org.springframework.http.HttpStatus getStatusCode()
Return the status code that should be returned to the client.- Returns:
- the HTTP status code
getReason
public CloudFoundryAuthorizationException.Reason getReason()
Return the reason why the authorization exception was thrown.- Returns:
- the reason