JavaTM Platform
Standard Ed. 6

javax.management
클래스 NotificationFilterSupport

java.lang.Object 
  상위를 확장 javax.management.NotificationFilterSupport
모든 구현된 인터페이스:
Serializable , NotificationFilter
직계의 기존의 서브 클래스:
MBeanServerNotificationFilter


public class NotificationFilterSupport
extends Object
implements NotificationFilter

NotificationFilter 인터페이스의 구현을 제공합니다. 통지형 속성에는, 필터링이 적용됩니다.

유효한 통지형의 리스트를 관리합니다. 사용자는, 메소드를 이용해, 필요한 수의 통지형을 유효 또는 무효로 할 수 있습니다.

통지 브로드 캐스터는, 필터에 등록된 청취자에게 통지를 송신하기 전에, 이 통지형과 필터에 의해 유효화 되는 모든 통지형을 비교합니다. 필터가 이 통지형을 유효하게 하는 경우에 한정해, 통지는 청취자에게 송신됩니다.

례:

 NotificationFilterSupport myFilter = new NotificationFilterSupport();
 myFilter.enableType("my_example.my_type");
 myBroadcaster.addListener(myListener, myFilter, null);
 
청취자 myListener 는, 「my_example.my_type」라고 동일한지, 이 캐릭터 라인으로 시작되는 형태의 통지만을 수신합니다.

도입된 버젼:
1.5
관련 항목:
NotificationBroadcaster.addNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object) , 직렬화 된 형식

생성자 의 개요
NotificationFilterSupport ()
           
 
메소드의 개요
 void disableAllTypes ()
          모든 통지형을 무효로 합니다.
 void disableType (String  prefix)
          접두사 리스트로부터 지정된 접두사를 삭제합니다.
 void enableType (String  prefix)
          특정의 접두사로 시작되는 모든 통지형의 통지를 청취자에게 송신합니다.
 Vector <String > getEnabledTypes ()
          이 필터용으로, 모든 유효한 통지형을 가져옵니다.
 boolean isNotificationEnabled (Notification  notification)
          청취자에게로의 특정의 통지의 송신전에 불려 갑니다.
 
클래스 java.lang. Object 로부터 상속된 메소드
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
 

생성자 의 상세

NotificationFilterSupport

public NotificationFilterSupport()
메소드의 상세

isNotificationEnabled

public boolean isNotificationEnabled(Notification  notification)
청취자에게로의 특정의 통지의 송신전에 불려 갑니다.
이 필터는, 지정된 통지와 유효한 형태를 비교합니다. 통지형이 유효한 형태에 일치하는 경우, 청취자에게 통지가 송신되어 이 메소드는 true 를 돌려줍니다.

정의:
인터페이스 NotificationFilter 내의 isNotificationEnabled
파라미터:
notification - 송신되는 통지
반환값:
통지를 청취자에게 송신할 필요가 있는 경우는 true, 그렇지 않은 경우는 false

enableType

public void enableType(String  prefix)
                throws IllegalArgumentException 
특정의 접두사로 시작되는 모든 통지형의 통지를 청취자에게 송신합니다.
지정된 접두사가 벌써 유효한 통지형의 리스트에 기재되어 있는 경우, 이 메소드는 아무것도 실시하지 않습니다.

례:

 // Enables all notifications the type of which starts with "my_example" to be sent.
 myFilter.enableType("my_example");
 // Enables all notifications the type of which is "my_example.my_type" to be sent.
 myFilter.enableType("my_example.my_type");
 
다음의 점에 주의해 주세요.
myFilter.enableType("my_example. *");
(은)는, 어느 통지형과도 일치하지 않습니다.

파라미터:
prefix - 접두사
예외:
IllegalArgumentException - 접두사 파라미터가 null 의 경우

disableType

public void disableType(String  prefix)
접두사 리스트로부터 지정된 접두사를 삭제합니다.
지정된 접두사가 유효한 통지형의 리스트에 없는 경우, 이 메소드는 아무것도 실시하지 않습니다.

파라미터:
prefix - 접두사

disableAllTypes

public void disableAllTypes()
모든 통지형을 무효로 합니다.


getEnabledTypes

public Vector <String > getEnabledTypes()
이 필터용으로, 모든 유효한 통지형을 가져옵니다.

반환값:
모든 유효한 통지형을 포함한 리스트

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 도 참조해 주세요.