本文整理汇总了Java中javax.naming.ldap.ControlFactory.getControlInstance方法的典型用法代码示例。如果您正苦于以下问题:Java ControlFactory.getControlInstance方法的具体用法?Java ControlFactory.getControlInstance怎么用?Java ControlFactory.getControlInstance使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类javax.naming.ldap.ControlFactory
的用法示例。
在下文中一共展示了ControlFactory.getControlInstance方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: narrowingControls
import javax.naming.ldap.ControlFactory; //导入方法依赖的package包/类
/**
* convert raw controls to particular type of controls using
* <code>getControlInstance(Control, Context,
Hashtable<?, ?>)</code>
*
* @param rawControls
* raw controls
* @return particular type of controls
*
* @throws NamingException
*/
private Control[] narrowingControls(Control[] rawControls)
throws NamingException {
if (rawControls == null) {
return null;
}
Control[] controls = new Control[rawControls.length];
for (int i = 0; i < rawControls.length; ++i) {
controls[i] = ControlFactory.getControlInstance(rawControls[i],
this, env);
}
return controls;
}
示例2: testGetControlInstanceControlContextHashtableOfQQ001
import javax.naming.ldap.ControlFactory; //导入方法依赖的package包/类
/**
* <p>Test method for 'javax.naming.ldap.ControlFactory.getControlInstance(Control, Context, Hashtable<?, ?>)'</p>
* <p>Here we are testing the static method of the class ControlFactory</p>
* <p>The expected result is null.</p>
*/
public void testGetControlInstanceControlContextHashtableOfQQ001() throws Exception {
ControlFactory.getControlInstance(null,null,null);
}