Package org.apache.aries.jmx.codec

Examples of org.apache.aries.jmx.codec.BundleEventData


        assertEquals(2, received.size());
        Notification installed = received.get(0);
        assertEquals(1, installed.getSequenceNumber());
        CompositeData installedCompositeData = (CompositeData) installed.getUserData();
        BundleEventData installedData = BundleEventData.from(installedCompositeData);
        assertEquals("bundle", installedData.getBundleSymbolicName());
        assertEquals(9, installedData.getBundleId());
        assertEquals("file:/location", installedData.getLocation());
        assertEquals(BundleEvent.INSTALLED, installedData.getEventType());

        Notification resolved = received.get(1);
        assertEquals(2, resolved.getSequenceNumber());
        CompositeData resolvedCompositeData = (CompositeData) resolved.getUserData();
        BundleEventData resolvedData = BundleEventData.from(resolvedCompositeData);
        assertEquals("bundle", resolvedData.getBundleSymbolicName());
        assertEquals(9, resolvedData.getBundleId());
        assertEquals("file:/location", resolvedData.getLocation());
        assertEquals(BundleEvent.RESOLVED, resolvedData.getEventType());

        assertEquals(1, attributeChanges.size());
        AttributeChangeNotification ac = attributeChanges.get(0);
        assertEquals("BundleIds", ac.getAttributeName());
        assertEquals(0, ((long [])ac.getOldValue()).length);
View Full Code Here


                bundleListener = new BundleListener() {
                    public void bundleChanged(BundleEvent event) {
                        try {
                            final Notification notification = new Notification(EVENT, OBJECTNAME,
                                    notificationSequenceNumber.getAndIncrement());
                            notification.setUserData(new BundleEventData(event).toCompositeData());

                            // also send notifications to the bundleIDs attribute listeners, if a bundle was added or removed
                            final AttributeChangeNotification attributeChangeNotification =
                                    getAttributeChangeNotification(event);
View Full Code Here

                bundleListener = new BundleListener() {
                    public void bundleChanged(BundleEvent event) {
                        final Notification notification = new Notification(EVENT, OBJECTNAME,
                                notificationSequenceNumber.getAndIncrement());
                        try {
                            notification.setUserData(new BundleEventData(event).toCompositeData());
                            eventDispatcher.submit(new Runnable() {
                                public void run() {
                                    sendNotification(notification);
                                }
                            });
View Full Code Here

                bundleListener = new BundleListener() {
                    public void bundleChanged(BundleEvent event) {
                        final Notification notification = new Notification(EVENT, OBJECTNAME,
                                notificationSequenceNumber.getAndIncrement());
                        try {
                            notification.setUserData(new BundleEventData(event).toCompositeData());
                            eventDispatcher.submit(new Runnable() {
                                public void run() {
                                    sendNotification(notification);
                                }
                            });
View Full Code Here

       
        assertEquals(2, received.size());
        Notification installed = received.get(0);
        assertEquals(1, installed.getSequenceNumber());
        CompositeData installedCompositeData = (CompositeData) installed.getUserData();
        BundleEventData installedData = BundleEventData.from(installedCompositeData);
        assertEquals("bundle", installedData.getBundleSymbolicName());
        assertEquals(9, installedData.getBundleId());
        assertEquals("file:/location", installedData.getLocation());
        assertEquals(BundleEvent.INSTALLED, installedData.getEventType());
       
        Notification resolved = received.get(1);
        assertEquals(2, resolved.getSequenceNumber());
        CompositeData resolvedCompositeData = (CompositeData) resolved.getUserData();
        BundleEventData resolvedData = BundleEventData.from(resolvedCompositeData);
        assertEquals("bundle", resolvedData.getBundleSymbolicName());
        assertEquals(9, resolvedData.getBundleId());
        assertEquals("file:/location", resolvedData.getLocation());
        assertEquals(BundleEvent.RESOLVED, resolvedData.getEventType());
       
    }
View Full Code Here

                bundleListener = new BundleListener() {
                    public void bundleChanged(BundleEvent event) {
                        final Notification notification = new Notification(EVENT, OBJECTNAME,
                                notificationSequenceNumber.getAndIncrement());
                        try {
                            notification.setUserData(new BundleEventData(event).toCompositeData());
                            eventDispatcher.submit(new Runnable() {
                                public void run() {
                                    sendNotification(notification);
                                }
                            });
View Full Code Here

TOP

Related Classes of org.apache.aries.jmx.codec.BundleEventData

Copyright © 2018 www.massapicom. 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.