text: <!DOCTYPE HTML>
  <!-- NewPage -->
  <html lang="en">
  <head>
  <!-- Generated by javadoc -->
  <title>LdapContext (Java SE 12 &amp; JDK 12 )</title>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="keywords" content="javax.naming.ldap.LdapContext interface">
  <meta name="keywords" content="CONTROL_FACTORIES">
  <meta name="keywords" content="extendedOperation()">
  <meta name="keywords" content="newInstance()">
  <meta name="keywords" content="reconnect()">
  <meta name="keywords" content="getConnectControls()">
  <meta name="keywords" content="setRequestControls()">
  <meta name="keywords" content="getRequestControls()">
  <meta name="keywords" content="getResponseControls()">
  <link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
  <link rel="stylesheet" type="text/css" href="../../../../jquery/jquery-ui.css" title="Style">
  <script type="text/javascript" src="../../../../script.js"></script>
  <script type="text/javascript" src="../../../../jquery/jszip/dist/jszip.min.js"></script>
  <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils.min.js"></script>
  <!--[if IE]>
  <script type="text/javascript" src="../../../../jquery/jszip-utils/dist/jszip-utils-ie.min.js"></script>
  <![endif]-->
  <script type="text/javascript" src="../../../../jquery/jquery-3.3.1.js"></script>
  <script type="text/javascript" src="../../../../jquery/jquery-migrate-3.0.1.js"></script>
  <script type="text/javascript" src="../../../../jquery/jquery-ui.js"></script>
  </head>
  <body>
  <script type="text/javascript"><!--
      try {
          if (location.href.indexOf('is-external=true') == -1) {
              parent.document.title="LdapContext (Java SE 12 & JDK 12 )";
          }
      }
      catch(err) {
      }
  //-->
  var data = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6};
  var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"]};
  var altColor = "altColor";
  var rowColor = "rowColor";
  var tableTab = "tableTab";
  var activeTableTab = "activeTableTab";
  var pathtoroot = "../../../../";
  var useModuleDirectories = true;
  loadScripts(document, 'script');</script>
  <noscript>
  <div>JavaScript is disabled on your browser.</div>
  </noscript>
  <header role="banner">
  <nav role="navigation">
  <div class="fixedNav">
  <!-- ========= START OF TOP NAVBAR ======= -->
  <div class="topNav"><a id="navbar.top">
  <!--   -->
  </a>
  <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  <a id="navbar.top.firstrow">
  <!--   -->
  </a>
  <ul class="navList" title="Navigation">
  <li><a href="../../../../index.html">Overview</a></li>
  <li><a href="../../../module-summary.html">Module</a></li>
  <li><a href="package-summary.html">Package</a></li>
  <li class="navBarCell1Rev">Class</li>
  <li><a href="class-use/LdapContext.html">Use</a></li>
  <li><a href="package-tree.html">Tree</a></li>
  <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  <li><a href="../../../../index-files/index-1.html">Index</a></li>
  <li><a href="../../../../help-doc.html">Help</a></li>
  </ul>
  <div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div>
  </div>
  <div class="subNav">
  <div>
  <ul class="subNavList">
  <li>Summary:&nbsp;</li>
  <li>Nested&nbsp;|&nbsp;</li>
  <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  <li>Constr&nbsp;|&nbsp;</li>
  <li><a href="#method.summary">Method</a></li>
  </ul>
  <ul class="subNavList">
  <li>Detail:&nbsp;</li>
  <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  <li>Constr&nbsp;|&nbsp;</li>
  <li><a href="#method.detail">Method</a></li>
  </ul>
  </div>
  <ul class="navListSearch">
  <li><label for="search">SEARCH:</label>
  <input type="text" id="search" value="search" disabled="disabled">
  <input type="reset" id="reset" value="reset" disabled="disabled">
  </li>
  </ul>
  </div>
  <a id="skip.navbar.top">
  <!--   -->
  </a>
  <!-- ========= END OF TOP NAVBAR ========= -->
  </div>
  <div class="navPadding">&nbsp;</div>
  <script type="text/javascript"><!--
  $('.navPadding').css('padding-top', $('.fixedNav').css("height"));
  //-->
  </script>
  </nav>
  </header>
  <!-- ======== START OF CLASS DATA ======== -->
  <main role="main">
  <div class="header">
  <div class="subTitle"><span class="moduleLabelInType">Module</span>&nbsp;<a href="../../../module-summary.html">java.naming</a></div>
  <div class="subTitle"><span class="packageLabelInType">Package</span>&nbsp;<a href="package-summary.html">javax.naming.ldap</a></div>
  <h2 title="Interface LdapContext" class="title">Interface LdapContext</h2>
  </div>
  <div class="contentContainer">
  <div class="description">
  <ul class="blockList">
  <li class="blockList">
  <dl>
  <dt>All Superinterfaces:</dt>
  <dd><code><a href="../Context.html" title="interface in javax.naming">Context</a></code>, <code><a href="../directory/DirContext.html" title="interface in javax.naming.directory">DirContext</a></code></dd>
  </dl>
  <dl>
  <dt>All Known Implementing Classes:</dt>
  <dd><code><a href="InitialLdapContext.html" title="class in javax.naming.ldap">InitialLdapContext</a></code></dd>
  </dl>
  <hr>
  <pre>public interface <span class="typeNameLabel">LdapContext</span>
  extends <a href="../directory/DirContext.html" title="interface in javax.naming.directory">DirContext</a></pre>
  <div class="block">This interface represents a context in which you can perform
   operations with LDAPv3-style controls and perform LDAPv3-style
   extended operations.
  
   For applications that do not require such controls or extended
   operations, the more generic <code>javax.naming.directory.DirContext</code>
   should be used instead.
  
   <h3>Usage Details About Controls</h3>
  
   This interface provides support for LDAP v3 controls.
   At a high level, this support allows a user
   program to set request controls for LDAP operations that are executed
   in the course of the user program's invocation of
   <code>Context</code>/<code>DirContext</code>
   methods, and read response controls resulting from LDAP operations.
   At the implementation level, there are some details that developers of
   both the user program and service providers need to understand in order
   to correctly use request and response controls.
  
   <h3>Request Controls</h3>
   <p>
   There are two types of request controls:
   <ul>
   <li>Request controls that affect how a connection is created
   <li>Request controls that affect context methods
   </ul>
  
   The former is used whenever a connection needs to be established or
   re-established with an LDAP server. The latter is used when all other
   LDAP operations are sent to the LDAP server.  The reason why a
   distinction between these two types of request controls is necessary
   is because JNDI is a high-level API that does not deal directly with
   connections.  It is the job of service providers to do any necessary
   connection management. Consequently, a single
   connection may be shared by multiple context instances, and a service provider
   is free to use its own algorithms to conserve connection and network
   usage. Thus, when a method is invoked on the context instance, the service
   provider might need to do some connection management in addition to
   performing the corresponding LDAP operations. For connection management,
   it uses the <em>connection request controls</em>, while for the normal
   LDAP operations, it uses the <em>context request controls</em>.
  <p>Unless explicitly qualified, the term "request controls" refers to
   context request controls.
  
   <h4>Context Request Controls</h4>
   There are two ways in which a context instance gets its request controls:
   <ol>
   <li><code>ldapContext.newInstance(<strong>reqCtls</strong>)</code>
   <li><code>ldapContext.setRequestControls(<strong>reqCtls</strong>)</code>
   </ol>
   where <code>ldapContext</code> is an instance of <code>LdapContext</code>.
   Specifying <code>null</code> or an empty array for <code>reqCtls</code>
   means no request controls.
   <code>newInstance()</code> creates a new instance of a context using
   <code>reqCtls</code>, while <code>setRequestControls()</code>
   updates an existing context instance's request controls to <code>reqCtls</code>.
   <p>
   Unlike environment properties, request controls of a context instance
   <em>are not inherited</em> by context instances that are derived from
   it.  Derived context instances have <code>null</code> as their context
   request controls.  You must set the request controls of a derived context
   instance explicitly using <code>setRequestControls()</code>.
   <p>
   A context instance's request controls are retrieved using
   the method <code>getRequestControls()</code>.
  
   <h4>Connection Request Controls</h4>
   There are three ways in which connection request controls are set:
   <ol>
   <li><code>
   new InitialLdapContext(env, <strong>connCtls</strong>)</code>
   <li><code>refException.getReferralContext(env, <strong>connCtls</strong>)</code>
   <li><code>ldapContext.reconnect(<strong>connCtls</strong>);</code>
   </ol>
   where <code>refException</code> is an instance of
   <code>LdapReferralException</code>, and <code>ldapContext</code> is an
   instance of <code>LdapContext</code>.
   Specifying <code>null</code> or an empty array for <code>connCtls</code>
   means no connection request controls.
   <p>
   Like environment properties, connection request controls of a context
   <em>are inherited</em> by contexts that are derived from it.
   Typically, you initialize the connection request controls using the
   <code>InitialLdapContext</code> constructor or
   <code>LdapReferralContext.getReferralContext()</code>. These connection
   request controls are inherited by contexts that share the same
   connection--that is, contexts derived from the initial or referral
   contexts.
   <p>
   Use <code>reconnect()</code> to change the connection request controls of
   a context.
   Invoking <code>ldapContext.reconnect()</code> affects only the
   connection used by <code>ldapContext</code> and any new contexts instances that are
   derived form <code>ldapContext</code>. Contexts that previously shared the
   connection with <code>ldapContext</code> remain unchanged. That is, a context's
   connection request controls must be explicitly changed and is not
   affected by changes to another context's connection request
   controls.
   <p>
   A context instance's connection request controls are retrieved using
   the method <code>getConnectControls()</code>.
  
   <h4>Service Provider Requirements</h4>
  
   A service provider supports connection and context request controls
   in the following ways.  Context request controls must be associated on
   a per context instance basis while connection request controls must be
   associated on a per connection instance basis.  The service provider
   must look for the connection request controls in the environment
   property "java.naming.ldap.control.connect" and pass this environment
   property on to context instances that it creates.
  
   <h3>Response Controls</h3>
  
   The method <code>LdapContext.getResponseControls()</code> is used to
   retrieve the response controls generated by LDAP operations executed
   as the result of invoking a <code>Context</code>/<code>DirContext</code>
   operation. The result is all of the responses controls generated
   by the underlying LDAP operations, including any implicit reconnection.
   To get only the reconnection response controls,
   use <code>reconnect()</code> followed by <code>getResponseControls()</code>.
  
   <h3>Parameters</h3>
  
   A <code>Control[]</code> array
   passed as a parameter to any method is owned by the caller.
   The service provider will not modify the array or keep a reference to it,
   although it may keep references to the individual <code>Control</code> objects
   in the array.
   A <code>Control[]</code> array returned by any method is immutable, and may
   not subsequently be modified by either the caller or the service provider.</div>
  <dl>
  <dt><span class="simpleTagLabel">Since:</span></dt>
  <dd>1.3</dd>
  <dt><span class="seeLabel">See Also:</span></dt>
  <dd><a href="InitialLdapContext.html" title="class in javax.naming.ldap"><code>InitialLdapContext</code></a>, 
  <a href="LdapReferralException.html#getReferralContext(java.util.Hashtable,javax.naming.ldap.Control%5B%5D)"><code>LdapReferralException.getReferralContext(java.util.Hashtable,javax.naming.ldap.Control[])</code></a></dd>
  </dl>
  </li>
  </ul>
  </div>
  <div class="summary">
  <ul class="blockList">
  <li class="blockList">
  <!-- =========== FIELD SUMMARY =========== -->
  <section role="region">
  <ul class="blockList">
  <li class="blockList"><a id="field.summary">
  <!--   -->
  </a>
  <h3>Field Summary</h3>
  <div class="memberSummary">
  <table>
  <caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
  <tr>
  <th class="colFirst" scope="col">Modifier and Type</th>
  <th class="colSecond" scope="col">Field</th>
  <th class="colLast" scope="col">Description</th>
  </tr>
  <tbody>
  <tr class="altColor">
  <td class="colFirst"><code>static <a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a></code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#CONTROL_FACTORIES">CONTROL_FACTORIES</a></span></code></th>
  <td class="colLast">
  <div class="block">Constant that holds the name of the environment property
   for specifying the list of control factories to use.</div>
  </td>
  </tr>
  </tbody>
  </table>
  </div>
  <ul class="blockList">
  <li class="blockList"><a id="fields.inherited.from.class.javax.naming.Context">
  <!--   -->
  </a>
  <h3>Fields declared in interface&nbsp;javax.naming.<a href="../Context.html" title="interface in javax.naming">Context</a></h3>
  <code><a href="../Context.html#APPLET">APPLET</a>, <a href="../Context.html#AUTHORITATIVE">AUTHORITATIVE</a>, <a href="../Context.html#BATCHSIZE">BATCHSIZE</a>, <a href="../Context.html#DNS_URL">DNS_URL</a>, <a href="../Context.html#INITIAL_CONTEXT_FACTORY">INITIAL_CONTEXT_FACTORY</a>, <a href="../Context.html#LANGUAGE">LANGUAGE</a>, <a href="../Context.html#OBJECT_FACTORIES">OBJECT_FACTORIES</a>, <a href="../Context.html#PROVIDER_URL">PROVIDER_URL</a>, <a href="../Context.html#REFERRAL">REFERRAL</a>, <a href="../Context.html#SECURITY_AUTHENTICATION">SECURITY_AUTHENTICATION</a>, <a href="../Context.html#SECURITY_CREDENTIALS">SECURITY_CREDENTIALS</a>, <a href="../Context.html#SECURITY_PRINCIPAL">SECURITY_PRINCIPAL</a>, <a href="../Context.html#SECURITY_PROTOCOL">SECURITY_PROTOCOL</a>, <a href="../Context.html#STATE_FACTORIES">STATE_FACTORIES</a>, <a href="../Context.html#URL_PKG_PREFIXES">URL_PKG_PREFIXES</a></code></li>
  </ul>
  <ul class="blockList">
  <li class="blockList"><a id="fields.inherited.from.class.javax.naming.directory.DirContext">
  <!--   -->
  </a>
  <h3>Fields declared in interface&nbsp;javax.naming.directory.<a href="../directory/DirContext.html" title="interface in javax.naming.directory">DirContext</a></h3>
  <code><a href="../directory/DirContext.html#ADD_ATTRIBUTE">ADD_ATTRIBUTE</a>, <a href="../directory/DirContext.html#REMOVE_ATTRIBUTE">REMOVE_ATTRIBUTE</a>, <a href="../directory/DirContext.html#REPLACE_ATTRIBUTE">REPLACE_ATTRIBUTE</a></code></li>
  </ul>
  </li>
  </ul>
  </section>
  <!-- ========== METHOD SUMMARY =========== -->
  <section role="region">
  <ul class="blockList">
  <li class="blockList"><a id="method.summary">
  <!--   -->
  </a>
  <h3>Method Summary</h3>
  <div class="memberSummary">
  <div role="tablist" aria-orientation="horizontal"><button role="tab" aria-selected="true" aria-controls="memberSummary_tabpanel" tabindex="0" onkeydown="switchTab(event)" id="t0" class="activeTableTab">All Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t2" class="tableTab" onclick="show(2);">Instance Methods</button><button role="tab" aria-selected="false" aria-controls="memberSummary_tabpanel" tabindex="-1" onkeydown="switchTab(event)" id="t3" class="tableTab" onclick="show(4);">Abstract Methods</button></div>
  <div id="memberSummary_tabpanel" role="tabpanel">
  <table aria-labelledby="t0">
  <tr>
  <th class="colFirst" scope="col">Modifier and Type</th>
  <th class="colSecond" scope="col">Method</th>
  <th class="colLast" scope="col">Description</th>
  </tr>
  <tbody>
  <tr class="altColor" id="i0">
  <td class="colFirst"><code><a href="ExtendedResponse.html" title="interface in javax.naming.ldap">ExtendedResponse</a></code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#extendedOperation(javax.naming.ldap.ExtendedRequest)">extendedOperation</a></span>&#8203;(<a href="ExtendedRequest.html" title="interface in javax.naming.ldap">ExtendedRequest</a>&nbsp;request)</code></th>
  <td class="colLast">
  <div class="block">Performs an extended operation.</div>
  </td>
  </tr>
  <tr class="rowColor" id="i1">
  <td class="colFirst"><code><a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]</code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getConnectControls()">getConnectControls</a></span>()</code></th>
  <td class="colLast">
  <div class="block">Retrieves the connection request controls in effect for this context.</div>
  </td>
  </tr>
  <tr class="altColor" id="i2">
  <td class="colFirst"><code><a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]</code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getRequestControls()">getRequestControls</a></span>()</code></th>
  <td class="colLast">
  <div class="block">Retrieves the request controls in effect for this context.</div>
  </td>
  </tr>
  <tr class="rowColor" id="i3">
  <td class="colFirst"><code><a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]</code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#getResponseControls()">getResponseControls</a></span>()</code></th>
  <td class="colLast">
  <div class="block">Retrieves the response controls produced as a result of the last
   method invoked on this context.</div>
  </td>
  </tr>
  <tr class="altColor" id="i4">
  <td class="colFirst"><code><a href="LdapContext.html" title="interface in javax.naming.ldap">LdapContext</a></code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#newInstance(javax.naming.ldap.Control%5B%5D)">newInstance</a></span>&#8203;(<a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;requestControls)</code></th>
  <td class="colLast">
  <div class="block">Creates a new instance of this context initialized using request controls.</div>
  </td>
  </tr>
  <tr class="rowColor" id="i5">
  <td class="colFirst"><code>void</code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#reconnect(javax.naming.ldap.Control%5B%5D)">reconnect</a></span>&#8203;(<a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;connCtls)</code></th>
  <td class="colLast">
  <div class="block">Reconnects to the LDAP server using the supplied controls and
   this context's environment.</div>
  </td>
  </tr>
  <tr class="altColor" id="i6">
  <td class="colFirst"><code>void</code></td>
  <th class="colSecond" scope="row"><code><span class="memberNameLink"><a href="#setRequestControls(javax.naming.ldap.Control%5B%5D)">setRequestControls</a></span>&#8203;(<a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;requestControls)</code></th>
  <td class="colLast">
  <div class="block">Sets the request controls for methods subsequently
   invoked on this context.</div>
  </td>
  </tr>
  </tbody>
  </table>
  </div>
  </div>
  <ul class="blockList">
  <li class="blockList"><a id="methods.inherited.from.class.javax.naming.Context">
  <!--   -->
  </a>
  <h3>Methods declared in interface&nbsp;javax.naming.<a href="../Context.html" title="interface in javax.naming">Context</a></h3>
  <code><a href="../Context.html#addToEnvironment(java.lang.String,java.lang.Object)">addToEnvironment</a>, <a href="../Context.html#bind(java.lang.String,java.lang.Object)">bind</a>, <a href="../Context.html#bind(javax.naming.Name,java.lang.Object)">bind</a>, <a href="../Context.html#close()">close</a>, <a href="../Context.html#composeName(java.lang.String,java.lang.String)">composeName</a>, <a href="../Context.html#composeName(javax.naming.Name,javax.naming.Name)">composeName</a>, <a href="../Context.html#createSubcontext(java.lang.String)">createSubcontext</a>, <a href="../Context.html#createSubcontext(javax.naming.Name)">createSubcontext</a>, <a href="../Context.html#destroySubcontext(java.lang.String)">destroySubcontext</a>, <a href="../Context.html#destroySubcontext(javax.naming.Name)">destroySubcontext</a>, <a href="../Context.html#getEnvironment()">getEnvironment</a>, <a href="../Context.html#getNameInNamespace()">getNameInNamespace</a>, <a href="../Context.html#getNameParser(java.lang.String)">getNameParser</a>, <a href="../Context.html#getNameParser(javax.naming.Name)">getNameParser</a>, <a href="../Context.html#list(java.lang.String)">list</a>, <a href="../Context.html#list(javax.naming.Name)">list</a>, <a href="../Context.html#listBindings(java.lang.String)">listBindings</a>, <a href="../Context.html#listBindings(javax.naming.Name)">listBindings</a>, <a href="../Context.html#lookup(java.lang.String)">lookup</a>, <a href="../Context.html#lookup(javax.naming.Name)">lookup</a>, <a href="../Context.html#lookupLink(java.lang.String)">lookupLink</a>, <a href="../Context.html#lookupLink(javax.naming.Name)">lookupLink</a>, <a href="../Context.html#rebind(java.lang.String,java.lang.Object)">rebind</a>, <a href="../Context.html#rebind(javax.naming.Name,java.lang.Object)">rebind</a>, <a href="../Context.html#removeFromEnvironment(java.lang.String)">removeFromEnvironment</a>, <a href="../Context.html#rename(java.lang.String,java.lang.String)">rename</a>, <a href="../Context.html#rename(javax.naming.Name,javax.naming.Name)">rename</a>, <a href="../Context.html#unbind(java.lang.String)">unbind</a>, <a href="../Context.html#unbind(javax.naming.Name)">unbind</a></code></li>
  </ul>
  <ul class="blockList">
  <li class="blockList"><a id="methods.inherited.from.class.javax.naming.directory.DirContext">
  <!--   -->
  </a>
  <h3>Methods declared in interface&nbsp;javax.naming.directory.<a href="../directory/DirContext.html" title="interface in javax.naming.directory">DirContext</a></h3>
  <code><a href="../directory/DirContext.html#bind(java.lang.String,java.lang.Object,javax.naming.directory.Attributes)">bind</a>, <a href="../directory/DirContext.html#bind(javax.naming.Name,java.lang.Object,javax.naming.directory.Attributes)">bind</a>, <a href="../directory/DirContext.html#createSubcontext(java.lang.String,javax.naming.directory.Attributes)">createSubcontext</a>, <a href="../directory/DirContext.html#createSubcontext(javax.naming.Name,javax.naming.directory.Attributes)">createSubcontext</a>, <a href="../directory/DirContext.html#getAttributes(java.lang.String)">getAttributes</a>, <a href="../directory/DirContext.html#getAttributes(java.lang.String,java.lang.String%5B%5D)">getAttributes</a>, <a href="../directory/DirContext.html#getAttributes(javax.naming.Name)">getAttributes</a>, <a href="../directory/DirContext.html#getAttributes(javax.naming.Name,java.lang.String%5B%5D)">getAttributes</a>, <a href="../directory/DirContext.html#getSchema(java.lang.String)">getSchema</a>, <a href="../directory/DirContext.html#getSchema(javax.naming.Name)">getSchema</a>, <a href="../directory/DirContext.html#getSchemaClassDefinition(java.lang.String)">getSchemaClassDefinition</a>, <a href="../directory/DirContext.html#getSchemaClassDefinition(javax.naming.Name)">getSchemaClassDefinition</a>, <a href="../directory/DirContext.html#modifyAttributes(java.lang.String,int,javax.naming.directory.Attributes)">modifyAttributes</a>, <a href="../directory/DirContext.html#modifyAttributes(java.lang.String,javax.naming.directory.ModificationItem%5B%5D)">modifyAttributes</a>, <a href="../directory/DirContext.html#modifyAttributes(javax.naming.Name,int,javax.naming.directory.Attributes)">modifyAttributes</a>, <a href="../directory/DirContext.html#modifyAttributes(javax.naming.Name,javax.naming.directory.ModificationItem%5B%5D)">modifyAttributes</a>, <a href="../directory/DirContext.html#rebind(java.lang.String,java.lang.Object,javax.naming.directory.Attributes)">rebind</a>, <a href="../directory/DirContext.html#rebind(javax.naming.Name,java.lang.Object,javax.naming.directory.Attributes)">rebind</a>, <a href="../directory/DirContext.html#search(java.lang.String,java.lang.String,java.lang.Object%5B%5D,javax.naming.directory.SearchControls)">search</a>, <a href="../directory/DirContext.html#search(java.lang.String,java.lang.String,javax.naming.directory.SearchControls)">search</a>, <a href="../directory/DirContext.html#search(java.lang.String,javax.naming.directory.Attributes)">search</a>, <a href="../directory/DirContext.html#search(java.lang.String,javax.naming.directory.Attributes,java.lang.String%5B%5D)">search</a>, <a href="../directory/DirContext.html#search(javax.naming.Name,java.lang.String,java.lang.Object%5B%5D,javax.naming.directory.SearchControls)">search</a>, <a href="../directory/DirContext.html#search(javax.naming.Name,java.lang.String,javax.naming.directory.SearchControls)">search</a>, <a href="../directory/DirContext.html#search(javax.naming.Name,javax.naming.directory.Attributes)">search</a>, <a href="../directory/DirContext.html#search(javax.naming.Name,javax.naming.directory.Attributes,java.lang.String%5B%5D)">search</a></code></li>
  </ul>
  </li>
  </ul>
  </section>
  </li>
  </ul>
  </div>
  <div class="details">
  <ul class="blockList">
  <li class="blockList">
  <!-- ============ FIELD DETAIL =========== -->
  <section role="region">
  <ul class="blockList">
  <li class="blockList"><a id="field.detail">
  <!--   -->
  </a>
  <h3>Field Detail</h3>
  <a id="CONTROL_FACTORIES">
  <!--   -->
  </a>
  <ul class="blockListLast">
  <li class="blockList">
  <h4>CONTROL_FACTORIES</h4>
  <pre>static final&nbsp;<a href="../../../../java.base/java/lang/String.html" title="class in java.lang">String</a> CONTROL_FACTORIES</pre>
  <div class="block">Constant that holds the name of the environment property
   for specifying the list of control factories to use. The value
   of the property should be a colon-separated list of the fully
   qualified class names of factory classes that will create a control
   given another control. See
   <code>ControlFactory.getControlInstance()</code> for details.
   This property may be specified in the environment, a system property,
   or one or more resource files.
  <p>
   The value of this constant is "java.naming.factory.control".</div>
  <dl>
  <dt><span class="seeLabel">See Also:</span></dt>
  <dd><a href="ControlFactory.html" title="class in javax.naming.ldap"><code>ControlFactory</code></a>, 
  <a href="../Context.html#addToEnvironment(java.lang.String,java.lang.Object)"><code>Context.addToEnvironment(java.lang.String, java.lang.Object)</code></a>, 
  <a href="../Context.html#removeFromEnvironment(java.lang.String)"><code>Context.removeFromEnvironment(java.lang.String)</code></a>, 
  <a href="../../../../constant-values.html#javax.naming.ldap.LdapContext.CONTROL_FACTORIES">Constant Field Values</a></dd>
  </dl>
  </li>
  </ul>
  </li>
  </ul>
  </section>
  <!-- ============ METHOD DETAIL ========== -->
  <section role="region">
  <ul class="blockList">
  <li class="blockList"><a id="method.detail">
  <!--   -->
  </a>
  <h3>Method Detail</h3>
  <a id="extendedOperation(javax.naming.ldap.ExtendedRequest)">
  <!--   -->
  </a>
  <ul class="blockList">
  <li class="blockList">
  <h4>extendedOperation</h4>
  <pre class="methodSignature"><a href="ExtendedResponse.html" title="interface in javax.naming.ldap">ExtendedResponse</a>&nbsp;extendedOperation&#8203;(<a href="ExtendedRequest.html" title="interface in javax.naming.ldap">ExtendedRequest</a>&nbsp;request)
                              throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Performs an extended operation.
  
   This method is used to support LDAPv3 extended operations.</div>
  <dl>
  <dt><span class="paramLabel">Parameters:</span></dt>
  <dd><code>request</code> - The non-null request to be performed.</dd>
  <dt><span class="returnLabel">Returns:</span></dt>
  <dd>The possibly null response of the operation. null means
   the operation did not generate any response.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while performing the
   extended operation.</dd>
  </dl>
  </li>
  </ul>
  <a id="newInstance(javax.naming.ldap.Control[])">
  <!--   -->
  </a>
  <ul class="blockList">
  <li class="blockList">
  <h4>newInstance</h4>
  <pre class="methodSignature"><a href="LdapContext.html" title="interface in javax.naming.ldap">LdapContext</a>&nbsp;newInstance&#8203;(<a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;requestControls)
                   throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Creates a new instance of this context initialized using request controls.
  
   This method is a convenience method for creating a new instance
   of this context for the purposes of multithreaded access.
   For example, if multiple threads want to use different context
   request controls,
   each thread may use this method to get its own copy of this context
   and set/get context request controls without having to synchronize with other
   threads.
  <p>
   The new context has the same environment properties and connection
   request controls as this context. See the class description for details.
   Implementations might also allow this context and the new context
   to share the same network connection or other resources if doing
   so does not impede the independence of either context.</div>
  <dl>
  <dt><span class="paramLabel">Parameters:</span></dt>
  <dd><code>requestControls</code> - The possibly null request controls
   to use for the new context.
   If null, the context is initialized with no request controls.</dd>
  <dt><span class="returnLabel">Returns:</span></dt>
  <dd>A non-null <code>LdapContext</code> instance.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while creating
   the new instance.</dd>
  <dt><span class="seeLabel">See Also:</span></dt>
  <dd><a href="InitialLdapContext.html" title="class in javax.naming.ldap"><code>InitialLdapContext</code></a></dd>
  </dl>
  </li>
  </ul>
  <a id="reconnect(javax.naming.ldap.Control[])">
  <!--   -->
  </a>
  <ul class="blockList">
  <li class="blockList">
  <h4>reconnect</h4>
  <pre class="methodSignature">void&nbsp;reconnect&#8203;(<a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;connCtls)
          throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Reconnects to the LDAP server using the supplied controls and
   this context's environment.
  <p>
   This method is a way to explicitly initiate an LDAP "bind" operation.
   For example, you can use this method to set request controls for
   the LDAP "bind" operation, or to explicitly connect to the server
   to get response controls returned by the LDAP "bind" operation.
  <p>
   This method sets this context's <code>connCtls</code>
   to be its new connection request controls. This context's
   context request controls are not affected.
   After this method has been invoked, any subsequent
   implicit reconnections will be done using <code>connCtls</code>.
   <code>connCtls</code> are also used as
   connection request controls for new context instances derived from this
   context.
   These connection request controls are not
   affected by <code>setRequestControls()</code>.
  <p>
   Service provider implementors should read the "Service Provider" section
   in the class description for implementation details.</div>
  <dl>
  <dt><span class="paramLabel">Parameters:</span></dt>
  <dd><code>connCtls</code> - The possibly null controls to use. If null, no
   controls are used.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while reconnecting.</dd>
  <dt><span class="seeLabel">See Also:</span></dt>
  <dd><a href="#getConnectControls()"><code>getConnectControls()</code></a>, 
  <a href="#newInstance(javax.naming.ldap.Control%5B%5D)"><code>newInstance(javax.naming.ldap.Control[])</code></a></dd>
  </dl>
  </li>
  </ul>
  <a id="getConnectControls()">
  <!--   -->
  </a>
  <ul class="blockList">
  <li class="blockList">
  <h4>getConnectControls</h4>
  <pre class="methodSignature"><a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;getConnectControls()
                        throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Retrieves the connection request controls in effect for this context.
   The controls are owned by the JNDI implementation and are
   immutable. Neither the array nor the controls may be modified by the
   caller.</div>
  <dl>
  <dt><span class="returnLabel">Returns:</span></dt>
  <dd>A possibly-null array of controls. null means no connect controls
   have been set for this context.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while getting the request
   controls.</dd>
  </dl>
  </li>
  </ul>
  <a id="setRequestControls(javax.naming.ldap.Control[])">
  <!--   -->
  </a>
  <ul class="blockList">
  <li class="blockList">
  <h4>setRequestControls</h4>
  <pre class="methodSignature">void&nbsp;setRequestControls&#8203;(<a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;requestControls)
                   throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Sets the request controls for methods subsequently
   invoked on this context.
   The request controls are owned by the JNDI implementation and are
   immutable. Neither the array nor the controls may be modified by the
   caller.
   <p>
   This removes any previous request controls and adds
   <code>requestControls</code>
   for use by subsequent methods invoked on this context.
   This method does not affect this context's connection request controls.
  <p>
   Note that <code>requestControls</code> will be in effect until the next
   invocation of <code>setRequestControls()</code>. You need to explicitly
   invoke <code>setRequestControls()</code> with <code>null</code> or an empty
   array to clear the controls if you don't want them to affect the
   context methods any more.
   To check what request controls are in effect for this context, use
   <code>getRequestControls()</code>.</div>
  <dl>
  <dt><span class="paramLabel">Parameters:</span></dt>
  <dd><code>requestControls</code> - The possibly null controls to use. If null, no
   controls are used.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while setting the
   request controls.</dd>
  <dt><span class="seeLabel">See Also:</span></dt>
  <dd><a href="#getRequestControls()"><code>getRequestControls()</code></a></dd>
  </dl>
  </li>
  </ul>
  <a id="getRequestControls()">
  <!--   -->
  </a>
  <ul class="blockList">
  <li class="blockList">
  <h4>getRequestControls</h4>
  <pre class="methodSignature"><a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;getRequestControls()
                        throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Retrieves the request controls in effect for this context.
   The request controls are owned by the JNDI implementation and are
   immutable. Neither the array nor the controls may be modified by the
   caller.</div>
  <dl>
  <dt><span class="returnLabel">Returns:</span></dt>
  <dd>A possibly-null array of controls. null means no request controls
   have been set for this context.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while getting the request
   controls.</dd>
  <dt><span class="seeLabel">See Also:</span></dt>
  <dd><a href="#setRequestControls(javax.naming.ldap.Control%5B%5D)"><code>setRequestControls(javax.naming.ldap.Control[])</code></a></dd>
  </dl>
  </li>
  </ul>
  <a id="getResponseControls()">
  <!--   -->
  </a>
  <ul class="blockListLast">
  <li class="blockList">
  <h4>getResponseControls</h4>
  <pre class="methodSignature"><a href="Control.html" title="interface in javax.naming.ldap">Control</a>[]&nbsp;getResponseControls()
                         throws <a href="../NamingException.html" title="class in javax.naming">NamingException</a></pre>
  <div class="block">Retrieves the response controls produced as a result of the last
   method invoked on this context.
   The response controls are owned by the JNDI implementation and are
   immutable. Neither the array nor the controls may be modified by the
   caller.
  <p>
   These response controls might have been generated by a successful or
   failed operation.
  <p>
   When a context method that may return response controls is invoked,
   response controls from the previous method invocation are cleared.
   <code>getResponseControls()</code> returns all of the response controls
   generated by LDAP operations used by the context method in the order
   received from the LDAP server.
   Invoking <code>getResponseControls()</code> does not
   clear the response controls. You can call it many times (and get
   back the same controls) until the next context method that may return
   controls is invoked.</div>
  <dl>
  <dt><span class="returnLabel">Returns:</span></dt>
  <dd>A possibly null array of controls. If null, the previous
   method invoked on this context did not produce any controls.</dd>
  <dt><span class="throwsLabel">Throws:</span></dt>
  <dd><code><a href="../NamingException.html" title="class in javax.naming">NamingException</a></code> - If an error occurred while getting the response
   controls.</dd>
  </dl>
  </li>
  </ul>
  </li>
  </ul>
  </section>
  </li>
  </ul>
  </div>
  </div>
  </main>
  <!-- ========= END OF CLASS DATA ========= -->
  <footer role="contentinfo">
  <nav role="navigation">
  <!-- ======= START OF BOTTOM NAVBAR ====== -->
  <div class="bottomNav"><a id="navbar.bottom">
  <!--   -->
  </a>
  <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  <a id="navbar.bottom.firstrow">
  <!--   -->
  </a>
  <ul class="navList" title="Navigation">
  <li><a href="../../../../index.html">Overview</a></li>
  <li><a href="../../../module-summary.html">Module</a></li>
  <li><a href="package-summary.html">Package</a></li>
  <li class="navBarCell1Rev">Class</li>
  <li><a href="class-use/LdapContext.html">Use</a></li>
  <li><a href="package-tree.html">Tree</a></li>
  <li><a href="../../../../deprecated-list.html">Deprecated</a></li>
  <li><a href="../../../../index-files/index-1.html">Index</a></li>
  <li><a href="../../../../help-doc.html">Help</a></li>
  </ul>
  <div class="aboutLanguage"><div style="margin-top: 14px;"><strong>Java SE 12 &amp; JDK 12</strong> </div></div>
  </div>
  <div class="subNav">
  <div>
  <ul class="subNavList">
  <li>Summary:&nbsp;</li>
  <li>Nested&nbsp;|&nbsp;</li>
  <li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
  <li>Constr&nbsp;|&nbsp;</li>
  <li><a href="#method.summary">Method</a></li>
  </ul>
  <ul class="subNavList">
  <li>Detail:&nbsp;</li>
  <li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
  <li>Constr&nbsp;|&nbsp;</li>
  <li><a href="#method.detail">Method</a></li>
  </ul>
  </div>
  </div>
  <a id="skip.navbar.bottom">
  <!--   -->
  </a>
  <!-- ======== END OF BOTTOM NAVBAR ======= -->
  </nav>
  <p class="legalCopy"><small><a href="https://bugreport.java.com/bugreport/">Report a bug or suggest an enhancement</a><br> For further API reference and developer documentation see the <a href="https://docs.oracle.com/pls/topic/lookup?ctx=javase12.0.2&amp;id=homepage" target="_blank">Java SE Documentation</a>, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples.<br> Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.<br> <a href="../../../../../legal/copyright.html">Copyright</a> &copy; 1993, 2019, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.<br>All rights reserved. Use is subject to <a href="https://www.oracle.com/technetwork/java/javase/terms/license/java12.0.2speclicense.html">license terms</a> and the <a href="https://www.oracle.com/technetwork/java/redist-137594.html">documentation redistribution policy</a>. <!-- Version 12.0.2+10 --></small></p>
  </footer>
  </body>
  </html>
  