Package com.sun.jmx.remote.internal

Examples of com.sun.jmx.remote.internal.NotificationBuffer.fetchNotifications()


        // Apply a filter that only selects the first notif, with max notifs 1,
        // then check that it skipped past the others even though it already
        // had its 1 notif
        NotificationBufferFilter firstFilter =
                makeFilter(new Integer(55), wildcardName, regFilter);
        nr = nb.fetchNotifications(firstFilter, 0, 1000L, 1);
        tns = nr.getTargetedNotifications();
        if (tns.length != 1
            || !tns[0].getNotification().getType().equals(notifType)) {
            System.out.println("Unexpected return from filtered call: " +
                               Arrays.asList(tns));
View Full Code Here


            || !tns[0].getNotification().getType().equals(notifType)) {
            System.out.println("Unexpected return from filtered call: " +
                               Arrays.asList(tns));
            return false;
        }
        nr = nb.fetchNotifications(allListenerFilter, nr.getNextSequenceNumber(),
                                   0L, 1000);
        tns = nr.getTargetedNotifications();
        if (tns.length != 0) {
            System.out.println("Expected 0 notifs, got: " +
                               Arrays.asList(tns));
View Full Code Here

                               Arrays.asList(tns));
            return false;
        }

        // Create a second, larger buffer, which should share the same notifs
        nr = nb.fetchNotifications(allListenerFilter, 0,
                                   1000L, Integer.MAX_VALUE);
        queuesize = new Integer(20);
        env.put(com.sun.jmx.remote.util.EnvHelp.BUFFER_SIZE_PROPERTY, queuesize);
        NotificationBuffer nb2 =
            ArrayNotificationBuffer.getNotificationBuffer(mbs, env);
View Full Code Here

        queuesize = new Integer(20);
        env.put(com.sun.jmx.remote.util.EnvHelp.BUFFER_SIZE_PROPERTY, queuesize);
        NotificationBuffer nb2 =
            ArrayNotificationBuffer.getNotificationBuffer(mbs, env);
        NotificationResult nr2 =
            nb2.fetchNotifications(allListenerFilter, 0,
                                   1000L, Integer.MAX_VALUE);
        if (nr.getEarliestSequenceNumber() != nr2.getEarliestSequenceNumber()
            || nr.getNextSequenceNumber() != nr2.getNextSequenceNumber()
            || !sameTargetedNotifs(nr.getTargetedNotifications(),
                                   nr2.getTargetedNotifications()))
View Full Code Here

            return false;
        System.out.println("Adding second buffer preserved notif list, OK");

        // Check that the capacity is now 20
        sender.sendNotifs("propter.hoc", 10);
        nr2 = nb2.fetchNotifications(allListenerFilter, 0,
                                     1000L, Integer.MAX_VALUE);
        if (nr.getEarliestSequenceNumber() !=
            nr2.getEarliestSequenceNumber()) {
            System.out.println("Earliest seq number changed after notifs " +
                               "that should have fit");
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.