Package javax.servlet

## Class HttpMethodConstraintElement

- java.lang.Object
- - javax.servlet.HttpConstraintElement
  - - javax.servlet.HttpMethodConstraintElement

    public class HttpMethodConstraintElement
    extends HttpConstraintElement

Programmatic equivalent of a security constraint defined for a single HTTP method.

Since:
  Servlet 3.0

### Constructor Summary

Constructors
`HttpMethodConstraintElement​(java.lang.String methodName)` Construct an instance for the given HTTP method name and a default `HttpConstraintElement`.
`HttpMethodConstraintElement​(java.lang.String methodName, HttpConstraintElement constraint)` Construct an instance for the given HTTP method name and `HttpConstraintElement`.

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `getMethodName()` Obtain the name of the HTTP method for which this constraint was created.

### Methods inherited from class javax.servlet.HttpConstraintElement

`getEmptyRoleSemantic, getRolesAllowed, getTransportGuarantee`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### HttpMethodConstraintElement

    public HttpMethodConstraintElement​(java.lang.String methodName)

Construct an instance for the given HTTP method name and a default `HttpConstraintElement`.

Parameters:
  `methodName` - The HTTP method name

#### HttpMethodConstraintElement

    public HttpMethodConstraintElement​(java.lang.String methodName,
                                       HttpConstraintElement constraint)

Construct an instance for the given HTTP method name and `HttpConstraintElement`.

Parameters:
  `methodName` - The HTTP method name
  `constraint` - The constraint for the given method

### Method Detail

#### getMethodName

    public java.lang.String getMethodName()

Obtain the name of the HTTP method for which this constraint was created.

Returns:
  The HTTP method name as provided to the constructor