Examples of ListenerInfo


Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

     */
    public String addNotificationListenerObjectName           objname,
                                            NotificationListener listener,
                                            NotificationFilter   filter,
                                            Object               handback) {
        ListenerInfo info = new ListenerInfo();

        info.listener   = listener;
        info.filter     = filter;
        info.handback   = handback;
        info.id         = info.computeId();

        ArrayList list = (ArrayList)listenerMap.get(objname);
        if (list == null) {
            list = new ArrayList();
        }
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

        ArrayList list = (ArrayList) listenerMap.get(mbean);
        if (list == null) {
            return (new String[0]);
        }

        ListenerInfo info1 = new ListenerInfo();
        info1.listener = listener;
        info1.filter = filter;
        info1.handback = handback;
        info1.id = info1.computeId();

        Iterator itr = list.iterator();
        // Because updating the list when we are iterating the list throws an exception,
        // unless we return immediately
        ArrayList list1 = (ArrayList) list.clone();
        while (itr.hasNext()) {
            ListenerInfo info = (ListenerInfo) itr.next();
            if (!listenerOnly && info.id.equals(info1.id)) {
                list1.remove(list1.indexOf(info));
                idlist.add(info.id);
            } else if (listenerOnly && info.listener == listener) {
                list1.remove(list1.indexOf(info));
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

                Notification notif = wrapr.getNotification();

                ArrayList listeners = (ArrayList) listenerMap.get(source);
                Iterator itr = listeners.iterator();
                while (itr.hasNext() && !isExiting()) {
                    ListenerInfo info = (ListenerInfo) itr.next();
                    boolean callListener = true;
                    if (info.filter != null)
                        callListener = info.filter.isNotificationEnabled(notif);
                    if (callListener)
                        info.listener.handleNotification(notif, info.handback);
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

        ObjectName objname2 = (ObjectName) request.getParams()[1];
        NotificationFilter filter = (NotificationFilter) request.getParams()[2];
        Object handback = request.getParams()[3];
        String lsnrid = (String) request.getParams()[4];

        ListenerInfo info = notifMgr.removeObjNameNotificationListener(objname1, lsnrid);
        if (info == null)
            info = new ListenerInfo(null, filter, handback);
        try {
            mbsc.removeNotificationListener(objname1, objname2, info.filter, info.handback);
        } catch (Exception e) {
            result = e;
            isException = true;
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

    try {
/* BEGIN -- S1WS_MOD */
            checkNotifInit();
/* END -- S1WS_MOD */
      connect();
            ListenerInfo info = new ListenerInfo(null, notificationFilter, obj);
      final MBeanServerResponseMessage response = conductor.invoke(
      MBeanServerRequestMessage.ADD_NOTIFICATION_LISTENER_OBJECTNAME,
      toArray(objectName, objectName1, notificationFilter, obj, info.computeId()) );
            MBeanServerResponseActor.voidOrThrow(response);
    }
    catch(Exception e) {
      MBeanServerConnectionExceptionThrower.addNotificationListeners(e);
    }
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

        try {
/* BEGIN -- S1WS_MOD */
            checkNotifInit();
/* END -- S1WS_MOD */
            connect();
            ListenerInfo info = new ListenerInfo(null, notificationFilter, obj);
            final MBeanServerResponseMessage response = conductor.invoke(
/* BEGIN -- S1WS_MOD */
/*
            MBeanServerRequestMessage.REMOVE_NOTIFICATION_LISTENER,
            toArray(objectName, objectName1, notificationFilter, obj) );
*/
            MBeanServerRequestMessage.REMOVE_NOTIFICATION_LISTENER_OBJECTNAME_FILTER_HANDBACK,
            toArray(objectName, objectName1, null, null, info.computeId()));
/* END -- S1WS_MOD */
            MBeanServerResponseActor.voidOrThrow(response);
        }
        catch(Exception e) {
      MBeanServerConnectionExceptionThrower.removeNotificationListenerObjectNameFilterHandback(e);
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

            Iterator itr = listenerMap.keySet().iterator();
            while (itr.hasNext()) {
                ObjectName mbean = (ObjectName) itr.next();
                ArrayList list = (ArrayList) listenerMap.get(mbean);
                for (int i=0, len=list.size(); i < len; i++) {
                    ListenerInfo info = (ListenerInfo) list.get(i);
                    if (info.proxy != null &&
                        ((NotificationListenerProxy)info.proxy).getId() == id) {
                        list.remove(i);
                        try {
                            mbsc.removeNotificationListener(
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

     */
    public String addObjNameNotificationListener(ObjectName mbean,
                                                 NotificationFilter filter,
                                                 Object handback,
                                                 String id) {
        ListenerInfo info = new ListenerInfo();
        info.filter = filter;
        info.handback = handback;
        info.id = id;
        addListenerInfo(mbean, info);
        return info.id;
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

     * and is bound to an id, refering this registration, sent by the client.
     */
    public String addNotificationListener(ObjectName mbean,
                                          String id,
                                          Object proxy) {
        ListenerInfo info = new ListenerInfo();
        info.id = id;
        info.proxy = proxy;
        addListenerInfo(mbean, info);

        return info.id;
View Full Code Here

Examples of com.sun.enterprise.admin.jmx.remote.notification.ListenerInfo

        Iterator itr = null;
        if (list == null)
            return null;
        itr = list.iterator();
        while (itr.hasNext()) {
            ListenerInfo info = (ListenerInfo) itr.next();
            if (info.id.equals(id)) {
                list.remove(list.indexOf(info));
                Object retObj = null;
                if (getProxy)
                    retObj = info.proxy;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.