JavaTM Platform
Standard Ed. 6

javax.naming.ldap
인터페이스 HasControls

기존의 서브 인터페이스의 일람:
UnsolicitedNotification


public interface HasControls

이 인터페이스는, 객체가 NamingEnumerations 로 돌려주어질 때, 컨트롤을 돌려주는데 사용됩니다. 예를 들어, 서버가 검색 조작의 결과를 가지는 컨트롤을 돌려 보내는 경우, 서비스 프로바이더는, SearchResult 및 implement 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
        }
   }

도입된 버젼:
1.3

메소드의 개요
 Control [] getControls ()
          이 인터페이스를 구현하는 객체로부터 Control 의 배열을 가져옵니다.
 

메소드의 상세

getControls

Control [] getControls()
                      throws NamingException 
이 인터페이스를 구현하는 객체로부터 Control 의 배열을 가져옵니다. 컨트롤이 없는 경우는, null 가 됩니다.

반환값:
Control 객체의 null 의 가능성이 있는 배열
예외:
NamingException - 에러이기 때문에 컨트롤을 돌려줄 수 없는 경우

JavaTM Platform
Standard Ed. 6

버그의 보고와 기능의 요청
한층 더 자세한 API 레퍼런스 및 개발자 문서에 대해서는,Java SE 개발자용 문서를 참조해 주세요. 개발자전용의 상세한 해설, 개념의 개요, 용어의 정의, 버그의 회피책, 및 코드 실례가 포함되어 있습니다.

Copyright 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.