FileDocCategorySizeDatePackage
HasControls.javaAPI DocJava SE 5 API1565Fri Aug 26 14:57:40 BST 2005javax.naming.ldap

HasControls

public interface HasControls
This interface is for returning controls with objects returned in NamingEnumerations. For example, suppose a server sends back controls with the results of a search operation, the service provider would return a NamingEnumeration of objects that are both SearchResult and implement HasControls.
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
}
}
author
Rosanna Lee
author
Scott Seligman
author
Vincent Ryan
version
1.8 03/12/19
since
1.3

Fields Summary
Constructors Summary
Methods Summary
public javax.naming.ldap.Control[]getControls()
Retrieves an array of Controls from the object that implements this interface. It is null if there are no controls.

return
A possibly null array of Control objects.
throws
NamingException If cannot return controls due to an error.