Class MethodNotAllowedException

All Implemented Interfaces:
Serializable

public class MethodNotAllowedException extends HttpException

A HTTP exception that indicates a client requested Method Not Allowed (405).

Since:
1.0
Author:
Jeremy Kuhn
See Also:
  • Constructor Details

    • MethodNotAllowedException

      public MethodNotAllowedException(Set<Method> allowedMethods)

      Creates a method not allowed exception with the specified list of methods allowed by the requested resource.

      Parameters:
      allowedMethods - a list of allowed methods
    • MethodNotAllowedException

      public MethodNotAllowedException(Set<Method> allowedMethods, String message)

      Creates a method not allowed exception with the specified list of methods allowed by the requested resource and message.

      Parameters:
      allowedMethods - a list of allowed methods
      message - a message
    • MethodNotAllowedException

      public MethodNotAllowedException(Set<Method> allowedMethods, Throwable cause)

      Creates a method not allowed exception with the specified list of methods allowed by the requested resource and cause.

      Parameters:
      allowedMethods - a list of allowed methods
      cause - a cause
    • MethodNotAllowedException

      public MethodNotAllowedException(Set<Method> allowedMethods, String message, Throwable cause)

      Creates a method not allowed exception with the specified list of methods allowed by the requested resource, message and cause.

      Parameters:
      allowedMethods - a list of allowed methods
      message - a message
      cause - a cause
  • Method Details

    • getAllowedMethods

      public Set<Method> getAllowedMethods()

      Returns the list of methods allowed by the requested resource.

      Returns:
      the list of allowed methods