|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
public interface HasControls
此接口用于返回控件,并使对象返回在 NamingEnumeration 中。例如,假定服务器利用搜索操作的结果发送回控件,服务提供者将返回类型为 SearchResult 并实现 HasControls 的对象所组成的 NamingEnumeration。
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
}
}
| 方法摘要 | |
|---|---|
Control[] |
getControls()
从实现此接口的对象中检索 Control 数组。 |
| 方法详细信息 |
|---|
Control[] getControls()
throws NamingException
NamingException - 如果因出错而无法返回控件。
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 上一个类 下一个类 | 框架 无框架 | |||||||||
| 摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 | |||||||||
版权所有 2007 Sun Microsystems, Inc. 保留所有权利。 请遵守许可证条款。另请参阅文档重新分发政策。