KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > objectweb > jonas > jtm > JTAResourceMBean


1 /**
2  * JOnAS: Java(TM) Open Application Server Copyright (C) 1999-2004 Bull S.A. Contact:
3  * jonas-team@objectweb.org This library is free software; you can redistribute
4  * it and/or modify it under the terms of the GNU Lesser General Public License
5  * as published by the Free Software Foundation; either version 2.1 of the
6  * License, or any later version. This library is distributed in the hope that
7  * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
8  * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9  * Lesser General Public License for more details. You should have received a
10  * copy of the GNU Lesser General Public License along with this library; if
11  * not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
12  * Boston, MA 02111-1307 USA
13  * --------------------------------------------------------------------------
14  * $Id: JTAResourceMBean.java,v 1.2 2004/09/20 12:51:48 danesa Exp $
15  * --------------------------------------------------------------------------
16  */

17 package org.objectweb.jonas.jtm;
18
19 import javax.management.MBeanException JavaDoc;
20 import javax.management.Notification JavaDoc;
21 import javax.management.NotificationFilter JavaDoc;
22 import javax.management.NotificationListener JavaDoc;
23
24 import org.apache.commons.modeler.BaseModelMBean;
25
26 /**
27  * MBean class for JTA resource management.
28  * @author Adriana Danes
29  */

30
31 public class JTAResourceMBean extends BaseModelMBean {
32
33     // ----------------------------- Contructors
34

35     public JTAResourceMBean() throws MBeanException JavaDoc {
36         super();
37     }
38
39     // ------------------------------- Public methods
40

41     /**
42      * Add a new listener.
43      * @param pListener Listener to notify
44      * @param pFilter Notification filter
45      * @param pHandback handback object reference
46      * @throws java.lang.IllegalArgumentException Listener parameter is null
47      */

48     public void addNotificationListener(NotificationListener JavaDoc pListener, NotificationFilter JavaDoc pFilter,
49             java.lang.Object JavaDoc pHandback) throws java.lang.IllegalArgumentException JavaDoc {
50         ((JTAResource) (this.resource)).addNotificationListener(pListener, pFilter, pHandback);
51     }
52 }
Popular Tags