# Class JNDIRealm.JNDIConnection

java.lang.Object
org.apache.catalina.realm.JNDIRealm.JNDIConnection

Enclosing class:
  `JNDIRealm`

protected static class JNDIRealm.JNDIConnection extends Object
Class holding the connection to the directory plus the associated non thread safe message formats.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `DirContext`
  `context`
  The directory context linking us to our directory server.
  `final MessageFormat`
  `roleBaseFormat`
  The MessageFormat object associated with the current `roleBase`.
  `final MessageFormat`
  `roleFormat`
  The MessageFormat object associated with the current `roleSearch`.
  `final MessageFormat[]`
  `userPatternFormatArray`
  An array of MessageFormat objects associated with the current `userPatternArray`.
  `final MessageFormat`
  `userSearchFormat`
  The MessageFormat object associated with the current `userSearch`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JNDIConnection(String userSearch, String[] userPatternArray, String roleBase, String roleSearch)`
  Constructs a new JNDIConnection.

- ## Method Summary

  ### Methods inherited from class Object

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

- ## Field Details

  - ### userSearchFormat

    public final MessageFormat userSearchFormat
    The MessageFormat object associated with the current `userSearch`.

  - ### userPatternFormatArray

    public final MessageFormat[] userPatternFormatArray
    An array of MessageFormat objects associated with the current `userPatternArray`.

  - ### roleBaseFormat

    public final MessageFormat roleBaseFormat
    The MessageFormat object associated with the current `roleBase`.

  - ### roleFormat

    public final MessageFormat roleFormat
    The MessageFormat object associated with the current `roleSearch`.

  - ### context

    public volatile DirContext context
    The directory context linking us to our directory server.

- ## Constructor Details

  - ### JNDIConnection

    public JNDIConnection(String userSearch, String[] userPatternArray, String roleBase, String roleSearch)
    Constructs a new JNDIConnection.
    Parameters:
      `userSearch` - the user search pattern
      `userPatternArray` - the user pattern array
      `roleBase` - the role base
      `roleSearch` - the role search pattern