Class MethodNotAllowedException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
-
- ca.uhn.fhir.rest.server.exceptions.MethodNotAllowedException
-
- All Implemented Interfaces:
Serializable
public class MethodNotAllowedException extends BaseServerResponseException
Represents an HTTP 405 Method Not Allowed response.Note that a complete list of RESTful exceptions is available in the Package Summary.
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATUS_CODE
-
Constructor Summary
Constructors Constructor Description MethodNotAllowedException(String theMessage)ConstructorMethodNotAllowedException(String theMessage, RequestTypeEnum... theAllowedMethods)ConstructorMethodNotAllowedException(String theMessage, IBaseOperationOutcome theOperationOutcome)ConstructorMethodNotAllowedException(String theMessage, IBaseOperationOutcome theOperationOutcome, RequestTypeEnum... theAllowedMethods)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<RequestTypeEnum>getAllowedMethods()Specifies the list of allowed HTTP methods (GET, POST, etc).voidsetAllowedMethods(RequestTypeEnum... theAllowedMethods)Specifies the list of allowed HTTP methods (GET, POST, etc).voidsetAllowedMethods(Set<RequestTypeEnum> theAllowedMethods)Specifies the list of allowed HTTP methods (GET, POST, etc).-
Methods inherited from class ca.uhn.fhir.rest.server.exceptions.BaseServerResponseException
addResponseHeader, getAdditionalMessages, getOperationOutcome, getResponseBody, getResponseHeaders, getResponseMimeType, getStatusCode, hasResponseHeaders, isErrorMessageTrusted, newInstance, setErrorMessageTrusted, setOperationOutcome, setResponseBody, setResponseMimeType
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Field Detail
-
STATUS_CODE
public static final int STATUS_CODE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MethodNotAllowedException
public MethodNotAllowedException(String theMessage, IBaseOperationOutcome theOperationOutcome, RequestTypeEnum... theAllowedMethods)
Constructor- Parameters:
theMessage- The messagetheOperationOutcome- The OperationOutcome resource to return to the clienttheAllowedMethods- A list of allowed methods (seesetAllowedMethods(RequestTypeEnum...))
-
MethodNotAllowedException
public MethodNotAllowedException(String theMessage, RequestTypeEnum... theAllowedMethods)
Constructor- Parameters:
theMessage- The messagetheAllowedMethods- A list of allowed methods (seesetAllowedMethods(RequestTypeEnum...))
-
MethodNotAllowedException
public MethodNotAllowedException(String theMessage, IBaseOperationOutcome theOperationOutcome)
Constructor- Parameters:
theMessage- The messagetheOperationOutcome- The OperationOutcome resource to return to the client
-
MethodNotAllowedException
public MethodNotAllowedException(String theMessage)
Constructor- Parameters:
theMessage- The message
-
-
Method Detail
-
getAllowedMethods
public Set<RequestTypeEnum> getAllowedMethods()
Specifies the list of allowed HTTP methods (GET, POST, etc). This is provided in anAllowheader, as required by the HTTP specification (RFC 2616).
-
setAllowedMethods
public void setAllowedMethods(RequestTypeEnum... theAllowedMethods)
Specifies the list of allowed HTTP methods (GET, POST, etc). This is provided in anAllowheader, as required by the HTTP specification (RFC 2616).
-
setAllowedMethods
public void setAllowedMethods(Set<RequestTypeEnum> theAllowedMethods)
Specifies the list of allowed HTTP methods (GET, POST, etc). This is provided in anAllowheader, as required by the HTTP specification (RFC 2616).
-
-