118 lines
4.0 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<div class="header">
<div class="subTitle">
compact3
</div>
<div class="subTitle">
javax.naming.ldap
</div>
<h2 class="title" title="Interface HasControls">Interface HasControls</h2>
</div><div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>
All Known Subinterfaces:
</dt>
<dd>
<span><a href="../../../javax/naming/ldap/UnsolicitedNotification.html" title="javax.naming.ldap中的接口">UnsolicitedNotification</a></span>
</dd>
</dl>
<hr/> <br/> <pre>public interface <span class="typeNameLabel">HasControls</span></pre>
<div class="block">
<span>此接口用于使用NamingEnumerations返回的对象返回控件。</span>
<span>例如假设服务器发回带有搜索操作结果的控件则服务提供者将返回两个SearchResult并实现HasControls的对象的NamingEnumeration。</span>
<blockquote>
<span><pre>
NamingEnumeration elts = ectx.search((Name)name, filter, sctls);
while (elts.hasMore()) {
Object entry = elts.next();
// Get search result
SearchResult res = (SearchResult)entry;
// do something with it
// Get entry controls
if (entry instanceof HasControls) {
Control[] entryCtls = ((HasControls)entry).getControls();
// do something with controls
}
}
</pre></span>
</blockquote>
</div>
<dl>
<dt>
<span class="simpleTagLabel">从以下版本开始:</span>
</dt>
<dd>
1.3
</dd>
</dl> </li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- --> </a> <h3>方法摘要</h3>
<table border="0" cellpadding="3" cellspacing="0" class="memberSummary" summary="Method Summary table, listing methods, and an explanation">
<caption>
<span class="activeTableTab" id="t0"><span>所有方法</span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t2"><span><a href="javascript:show(2);">接口方法</a></span><span class="tabEnd"> </span></span>
<span class="tableTab" id="t3"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd"> </span></span>
</caption>
<tbody>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor" id="i0">
<td class="colFirst"><code><a href="../../../javax/naming/ldap/Control.html" title="interface in javax.naming.ldap">Control</a>[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../javax/naming/ldap/HasControls.html#getControls--">getControls</a></span>()</code>
<div class="block">
检索的
<tt>Control</tt>期从实现该接口的对象的阵列。
</div> </td>
</tr>
</tbody>
</table> </li>
</ul> </li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- --> </a> <h3>方法详细信息</h3> <a name="getControls--">
<!-- --> </a>
<ul class="blockListLast">
<li class="blockList"> <h4>getControls</h4> <pre><a href="../../../javax/naming/ldap/Control.html" title="interface in javax.naming.ldap">Control</a>[] getControls()
throws <a href="../../../javax/naming/NamingException.html" title="class in javax.naming">NamingException</a></pre>
<div class="block">
<span>检索的<tt>Control</tt>期从实现该接口的对象的阵列。</span>
<span>如果没有控件则为null。</span>
</div>
<dl>
<dt>
<span class="returnLabel">结果</span>
</dt>
<dd>
<tt>Control</tt>对象可能为空数组。
</dd>
<dt>
<span class="throwsLabel">异常</span>
</dt>
<dd>
<code><a href="../../../javax/naming/NamingException.html" title="class in javax.naming">NamingException</a></code> - If cannot return controls due to an error.
</dd>
</dl> </li>
</ul> </li>
</ul> </li>
</ul>
</div>
</div>