Package de.uplanet.net.http
Klasse 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
- Alle implementierten Schnittstellen:
Serializable
@ResponseStatus(METHOD_NOT_ALLOWED)
public final class HttpMethodNotAllowedException
extends HttpClientErrorException
This exception corresponds to the HTTP 405 status code.
- Siehe auch:
-
Konstruktorübersicht
KonstruktorenKonstruktorBeschreibungHttpMethodNotAllowedException(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. -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungGet 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.Von Klasse geerbte Methoden de.uplanet.net.http.HttpErrorException
getStatusMessageVon Klasse geerbte Methoden java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Konstruktordetails
-
HttpMethodNotAllowedException
Create 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.- Parameter:
p_allowedMethods- An optional list of allowed methods.
-
HttpMethodNotAllowedException
Create 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.- Parameter:
p_allowedMethods- An optional list of allowed methods.
-
HttpMethodNotAllowedException
Create 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.- Parameter:
p_cause- The cause that can be later retrieved by theThrowable.getCause()method.p_allowedMethods- An optional list of allowed methods.
-
HttpMethodNotAllowedException
Create 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.- Parameter:
p_cause- The cause that can be later retrieved by theThrowable.getCause()method.p_allowedMethods- An optional list of allowed methods.
-
-
Methodendetails
-
getStatus
public int getStatus()Beschreibung aus Klasse kopiert:HttpErrorExceptionGet the HTTP status associated with this error.- Setzt außer Kraft:
getStatusin KlasseHttpErrorException- Gibt zurück:
- The HTTP status code
405 Method Not Allowed.
-
hasAllowedMethods
public boolean hasAllowedMethods()Check if allowed methods are specified.- Gibt zurück:
trueif allowed methods are specified, orfalseotherwise.
-
getAllowedMethods
Get a copy of an enum set that contains all allowed methods.- Gibt zurück:
- The enum set.
-
getAllowedMethodsHeaderValue
Get the allowed methods formatted as a list suitable to be used as a value of the HTTPAllowheader.- Gibt zurück:
- The allowed methods, or
nullifhasAllowedMethods()isfalse.
-