WebSphere Extended Deployment, Version 6.0.x     운영 체제: AIX, HP-UX, Linux, Solaris, Windows

알림 인터페이스

Servlet API는 HHttpPartitionNotification 인터페이스를 사용하여 파티션 콜백(파티션 이벤트 관련)을 수신하는 메소드로 구성됩니다. 알림 인터페이스는 다음과 같습니다.
public interface HttpPartitionNotification {
	    /* 
	     * Fetch the vector of partition strings from the web module.
	     */
	    public Vector getPartitions();
	
	    /* 
	     * Fetch the array of expressions from the web module.
	     */
	    public HttpPartitionExpression[] getExpressions();
	
	    /* 
	     * Queries the web module to determine if the specified partition 
      is still alive.
	     */
	    public boolean isPartitionAlive(String partitionName);
	
	    /* 
	     * Indicates that this partition has been loaded by WPF.
	     */
	    public boolean loadEvent(String partitionName);
	
	    /* 
	     * Indicates that this partition has been loaded by WPF.
	     */
	    public void unloadEvent(String partitionName);
	}
이 인터페이스는 WebSphere Application Server 파티션 기능에서 지원하는 인터페이스와 매우 유사하지만 몇 가지 차이점이 있습니다. 가장 큰 차이점은 이 응용프로그램에서 사용할 요청 표현식을 수집할 때 HTTP 파티션 기능에서 사용하는 getExpressions() 메소드의 포함 여부입니다. Servlet은 알림을 수신하기 위해, 예를 들어 init() 메소드에서 HttpPartitionManager.registerNotfication() 메소드를 호출하여 자체 등록하거나 일부 다른 클래스를 등록할 수 있습니다.
public void init() throws ServletException {
    	System.out.println(className+": Registering notification ");
		httpPartitionManager.registerNotification(appName, this);
	  }
	
    public void destroy() {
   	System.out.println(className+": Deregistering notification ");
		httpPartitionManager.deregisterNotification(appName, this);
	    }

이 예에서는 Servlet의 destroy() 메소드에서 HttpPartitionManager.deregisterNotfication() 메소드를 사용하는 경우도 보여줍니다. 정확성을 위해 등록된 모든 알림을 등록 취소해야 합니다.



Related concepts
HTTP 프로그래밍 인터페이스

참조 주제:    

이용 약관 | 피드백 마지막 갱신 날짜: Mar 21, 2006 11:38:53 AM EST
http://publib.boulder.ibm.com/infocenter/wxdinfo/v6r0/index.jsp?topic=?topic=/com.ibm.websphere.xd.doc/info/WPF51/rwpfNotificationInterface.html

© Copyright IBM 2005, 2006. All Rights Reserved.
이 Information Center는 Eclipse 테크놀러지로 강화되었습니다. (http://www.eclipse.org)