org.wildfly.swarm.config.elytron

## Class DirContext<T extends DirContext<T>>

- java.lang.Object
- - org.wildfly.swarm.config.elytron.DirContext<T>

-     public class DirContext<T extends DirContext<T>>
      extends Object

  The configuration to connect to a directory (LDAP) server.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `DirContext.ReferralMode`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DirContext(String key)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener listener)` Adds a property change listener
    `String` | `authenticationContext()` The authentication context to obtain login credentials to connect to the LDAP server.
    `T` | `authenticationContext(String value)` The authentication context to obtain login credentials to connect to the LDAP server.
    `String` | `authenticationLevel()` The authentication level (security level/authentication mechanism) to use.
    `T` | `authenticationLevel(String value)` The authentication level (security level/authentication mechanism) to use.
    `Integer` | `connectionTimeout()` The timeout for connecting to the LDAP server in milliseconds.
    `T` | `connectionTimeout(Integer value)` The timeout for connecting to the LDAP server in milliseconds.
    `Map` | `credentialReference()` The credential reference to authenticate and connect to the LDAP server.
    `T` | `credentialReference(Map value)` The credential reference to authenticate and connect to the LDAP server.
    `T` | `credentialReference(String key, Object value)` The credential reference to authenticate and connect to the LDAP server.
    `Boolean` | `enableConnectionPooling()` Indicates if connection pooling is enabled.
    `T` | `enableConnectionPooling(Boolean value)` Indicates if connection pooling is enabled.
    `String` | `getKey()`
    `String` | `module()` Name of module that will be used as class loading base.
    `T` | `module(String value)` Name of module that will be used as class loading base.
    `String` | `principal()` The principal to authenticate and connect to the LDAP server.
    `T` | `principal(String value)` The principal to authenticate and connect to the LDAP server.
    `Map` | `properties()` The additional connection properties for the DirContext.
    `T` | `properties(Map value)` The additional connection properties for the DirContext.
    `T` | `property(String key, Object value)` The additional connection properties for the DirContext.
    `Integer` | `readTimeout()` The read timeout for an LDAP operation in milliseconds.
    `T` | `readTimeout(Integer value)` The read timeout for an LDAP operation in milliseconds.
    `DirContext.ReferralMode` | `referralMode()` If referrals should be followed.
    `T` | `referralMode(DirContext.ReferralMode value)` If referrals should be followed.
    `void` | `removePropertyChangeListener(PropertyChangeListener listener)` Removes a property change listener
    `String` | `sslContext()` The name of ssl-context used to secure connection to the LDAP server.
    `T` | `sslContext(String value)` The name of ssl-context used to secure connection to the LDAP server.
    `String` | `url()` The connection url.
    `T` | `url(String value)` The connection url.

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

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

- - ### Constructor Detail

    - #### DirContext

          public DirContext(String key)

  - ### Method Detail

    - #### getKey

          public String getKey()

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener listener)

      Adds a property change listener

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener listener)

      Removes a property change listener

    - #### authenticationContext

          public String authenticationContext()

      The authentication context to obtain login credentials to connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### authenticationContext

          public T authenticationContext(String value)

      The authentication context to obtain login credentials to connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### authenticationLevel

          public String authenticationLevel()

      The authentication level (security level/authentication mechanism) to use. Corresponds to SECURITY_AUTHENTICATION ("java.naming.security.authentication") environment property. Allowed values: "none", "simple", sasl_mech, where sasl_mech is a space-separated list of SASL mechanism names.

    - #### authenticationLevel

          public T authenticationLevel(String value)

      The authentication level (security level/authentication mechanism) to use. Corresponds to SECURITY_AUTHENTICATION ("java.naming.security.authentication") environment property. Allowed values: "none", "simple", sasl_mech, where sasl_mech is a space-separated list of SASL mechanism names.

    - #### connectionTimeout

          public Integer connectionTimeout()

      The timeout for connecting to the LDAP server in milliseconds.

    - #### connectionTimeout

          public T connectionTimeout(Integer value)

      The timeout for connecting to the LDAP server in milliseconds.

    - #### credentialReference

          public Map credentialReference()

      The credential reference to authenticate and connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### credentialReference

          public T credentialReference(Map value)

      The credential reference to authenticate and connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### credentialReference

          public T credentialReference(String key,
                                       Object value)

      The credential reference to authenticate and connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### enableConnectionPooling

          public Boolean enableConnectionPooling()

      Indicates if connection pooling is enabled.

    - #### enableConnectionPooling

          public T enableConnectionPooling(Boolean value)

      Indicates if connection pooling is enabled.

    - #### module

          public String module()

      Name of module that will be used as class loading base.

    - #### module

          public T module(String value)

      Name of module that will be used as class loading base.

    - #### principal

          public String principal()

      The principal to authenticate and connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### principal

          public T principal(String value)

      The principal to authenticate and connect to the LDAP server. Can be omitted if authentication-level is "none" (anonymous).

    - #### properties

          public Map properties()

      The additional connection properties for the DirContext.

    - #### properties

          public T properties(Map value)

      The additional connection properties for the DirContext.

    - #### property

          public T property(String key,
                            Object value)

      The additional connection properties for the DirContext.

    - #### readTimeout

          public Integer readTimeout()

      The read timeout for an LDAP operation in milliseconds.

    - #### readTimeout

          public T readTimeout(Integer value)

      The read timeout for an LDAP operation in milliseconds.

    - #### referralMode

          public DirContext.ReferralMode referralMode()

      If referrals should be followed.

    - #### referralMode

          public T referralMode(DirContext.ReferralMode value)

      If referrals should be followed.

    - #### sslContext

          public String sslContext()

      The name of ssl-context used to secure connection to the LDAP server.

    - #### sslContext

          public T sslContext(String value)

      The name of ssl-context used to secure connection to the LDAP server.

    - #### url

          public String url()

      The connection url.

    - #### url

          public T url(String value)

      The connection url.

Copyright © 2017 JBoss by Red Hat. All rights reserved.