javax.servlet

## Class HttpConstraintElement

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

Direct Known Subclasses:
  HttpMethodConstraintElement, ServletSecurityElement

    public class HttpConstraintElement
    extends java.lang.Object

Since:
  Servlet 3.0 TODO SERVLET3 - Add comments

### Constructor Summary

Constructors
Constructor and Description
`HttpConstraintElement()` Default constraint is permit with no transport guarantee.
`HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic)` Convenience constructor for `ServletSecurity.EmptyRoleSemantic.DENY`.
`HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic, ServletSecurity.TransportGuarantee transportGuarantee, java.lang.String... rolesAllowed)`
`HttpConstraintElement(ServletSecurity.TransportGuarantee transportGuarantee, java.lang.String... rolesAllowed)` Convenience constructor to specify transport guarantee and/or roles.

### Method Summary

Methods
`ServletSecurity.EmptyRoleSemantic` `getEmptyRoleSemantic()`
`java.lang.String[]` `getRolesAllowed()`
`ServletSecurity.TransportGuarantee` `getTransportGuarantee()`

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

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

### Constructor Detail

#### HttpConstraintElement

    public HttpConstraintElement()

Default constraint is permit with no transport guarantee.

#### HttpConstraintElement

    public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic)

Convenience constructor for `ServletSecurity.EmptyRoleSemantic.DENY`.

#### HttpConstraintElement

    public HttpConstraintElement(ServletSecurity.TransportGuarantee transportGuarantee,
                         java.lang.String... rolesAllowed)

Convenience constructor to specify transport guarantee and/or roles.

#### HttpConstraintElement

    public HttpConstraintElement(ServletSecurity.EmptyRoleSemantic emptyRoleSemantic,
                         ServletSecurity.TransportGuarantee transportGuarantee,
                         java.lang.String... rolesAllowed)

Parameters:
  `emptyRoleSemantic` -
  `transportGuarantee` -
  `rolesAllowed` -
Throws:
  `java.lang.IllegalArgumentException` - if roles are specified when DENY is used

### Method Detail

#### getEmptyRoleSemantic

    public ServletSecurity.EmptyRoleSemantic getEmptyRoleSemantic()

#### getTransportGuarantee

    public ServletSecurity.TransportGuarantee getTransportGuarantee()

#### getRolesAllowed

    public java.lang.String[] getRolesAllowed()