Package org.osgi.service.event

Examples of org.osgi.service.event.TopicPermission.implies()


        TopicPermission actualPermission
          = new TopicPermission("com/acme/*","subscribe");

        assertTrue(getName() +"Should not recevice this topic:"
                   +(String)event.getProperty(EventConstants.EVENT_TOPIC),
                   actualPermission.implies(permissionAquired));

        Object message;
        /* try to get the message */
        message = event.getProperty("Synchronus message");
        /* check if message is null */
 
View Full Code Here


        /* make a topic permission from the received topic in order to check it*/
        TopicPermission permissionAccuired = new TopicPermission(eventTopic, "SUBSCRIBE");
        /* make a topic permission from the topic to consume in order to check it*/
        TopicPermission actualPermission = new TopicPermission(topicsToConsume[0], "SUBSCRIBE");
        /* assert if the topic in the event is the same as the topic to listen fore including wildcard */
        assertTrue("The topics was not equal", actualPermission.implies(permissionAccuired));

        Object message;
        /* try to get the message */
        message = event.getProperty("Synchronus message");

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.