Package de.uplanet.net.http
Class HttpMethodNotAllowedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.uplanet.net.http.HttpErrorException
de.uplanet.net.http.HttpClientErrorException
de.uplanet.net.http.HttpMethodNotAllowedException
- All Implemented Interfaces:
- Serializable
This exception corresponds to the HTTP 405 status code.
- See Also:
- 
Constructor SummaryConstructorsConstructorDescriptionHttpMethodNotAllowedException(HTTP_METHOD... p_allowedMethods) Create a HTTP exception with the status code405 Method Not Allowed.HttpMethodNotAllowedException(Throwable p_cause, HTTP_METHOD... p_allowedMethods) Create a HTTP exception with the status code405 Method Not Allowed.HttpMethodNotAllowedException(Throwable p_cause, EnumSet<HTTP_METHOD> p_allowedMethods) Create a HTTP exception with the status code405 Method Not Allowed.HttpMethodNotAllowedException(EnumSet<HTTP_METHOD> p_allowedMethods) Create a HTTP exception with the status code405 Method Not Allowed.
- 
Method SummaryModifier and TypeMethodDescriptionGet a copy of an enum set that contains all allowed methods.Get the allowed methods formatted as a list suitable to be used as a value of the HTTPAllowheader.intGet the HTTP status associated with this error.booleanCheck if allowed methods are specified.Methods inherited from class de.uplanet.net.http.HttpErrorExceptiongetStatusMessageMethods inherited from class java.lang.ThrowableaddSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
- 
Constructor Details- 
HttpMethodNotAllowedExceptionCreate a HTTP exception with the status code405 Method Not Allowed.An optional list of allowed methods can be specified which can be used to set the HTTP Allowheader in responses.- Parameters:
- p_allowedMethods- An optional list of allowed methods.
 
- 
HttpMethodNotAllowedExceptionCreate a HTTP exception with the status code405 Method Not Allowed.An optional list of allowed methods can be specified which can be used to set the HTTP Allowheader in responses.- Parameters:
- p_allowedMethods- An optional list of allowed methods.
 
- 
HttpMethodNotAllowedExceptionCreate a HTTP exception with the status code405 Method Not Allowed.An optional list of allowed methods can be specified which can be used to set the HTTP Allowheader in responses.- Parameters:
- p_cause- The cause that can be later retrieved by the- Throwable.getCause()method.
- p_allowedMethods- An optional list of allowed methods.
 
- 
HttpMethodNotAllowedExceptionCreate a HTTP exception with the status code405 Method Not Allowed.An optional list of allowed methods can be specified which can be used to set the HTTP Allowheader in responses.- Parameters:
- p_cause- The cause that can be later retrieved by the- Throwable.getCause()method.
- p_allowedMethods- An optional list of allowed methods.
 
 
- 
- 
Method Details- 
getStatuspublic int getStatus()Description copied from class:HttpErrorExceptionGet the HTTP status associated with this error.- Overrides:
- getStatusin class- HttpErrorException
- Returns:
- The HTTP status code 405 Method Not Allowed.
 
- 
hasAllowedMethodspublic boolean hasAllowedMethods()Check if allowed methods are specified.- Returns:
- trueif allowed methods are specified, or- falseotherwise.
 
- 
getAllowedMethodsGet a copy of an enum set that contains all allowed methods.- Returns:
- The enum set.
 
- 
getAllowedMethodsHeaderValueGet the allowed methods formatted as a list suitable to be used as a value of the HTTPAllowheader.- Returns:
- The allowed methods, or nullifhasAllowedMethods()isfalse.
 
 
-