NotificationListener.java revision 10444:f08705540498
1135446Strhodes/* 2193149Sdougb * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. 3135446Strhodes * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4135446Strhodes * 5193149Sdougb * This code is free software; you can redistribute it and/or modify it 6135446Strhodes * under the terms of the GNU General Public License version 2 only, as 7135446Strhodes * published by the Free Software Foundation. Oracle designates this 8135446Strhodes * particular file as subject to the "Classpath" exception as provided 9135446Strhodes * by Oracle in the LICENSE file that accompanied this code. 10135446Strhodes * 11135446Strhodes * This code is distributed in the hope that it will be useful, but WITHOUT 12135446Strhodes * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13135446Strhodes * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14135446Strhodes * version 2 for more details (a copy is included in the LICENSE file that 15135446Strhodes * accompanied this code). 16135446Strhodes * 17135446Strhodes * You should have received a copy of the GNU General Public License version 18193149Sdougb * 2 along with this work; if not, write to the Free Software Foundation, 19135446Strhodes * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20170222Sdougb * 21170222Sdougb * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22135446Strhodes * or visit www.oracle.com if you need additional information or have any 23135446Strhodes * questions. 24170222Sdougb */ 25170222Sdougb 26170222Sdougbpackage javax.management; 27170222Sdougb 28135446Strhodes 29135446Strhodes/** 30135446Strhodes * Should be implemented by an object that wants to receive notifications. 31135446Strhodes * 32135446Strhodes * @since 1.5 33135446Strhodes */ 34135446Strhodespublic interface NotificationListener extends java.util.EventListener { 35135446Strhodes 36135446Strhodes /** 37135446Strhodes * Invoked when a JMX notification occurs. 38135446Strhodes * The implementation of this method should return as soon as possible, to avoid 39135446Strhodes * blocking its notification broadcaster. 40135446Strhodes * 41135446Strhodes * @param notification The notification. 42135446Strhodes * @param handback An opaque object which helps the listener to associate 43135446Strhodes * information regarding the MBean emitter. This object is passed to the 44135446Strhodes * addNotificationListener call and resent, without modification, to the 45135446Strhodes * listener. 46135446Strhodes */ 47135446Strhodes public void handleNotification(Notification notification, Object handback); 48135446Strhodes} 49135446Strhodes