Search in sources :

Example 6 with NotificationService

use of com.sun.appserv.management.base.NotificationService in project Payara by payara.

the class NotificationServiceTest method testGetFromEmpty.

public void testGetFromEmpty() throws Exception {
    final NotificationService proxy = create();
    assert (proxy.getListeneeSet().size() == 0);
    final Object id = proxy.createBuffer(10, null);
    final Map<String, Object> result = proxy.getBufferNotifications(id, 0);
    final Notification[] notifs = (Notification[]) result.get(proxy.NOTIFICATIONS_KEY);
    assertEquals(0, notifs.length);
}
Also used : NotificationService(com.sun.appserv.management.base.NotificationService) Notification(javax.management.Notification) AttributeChangeNotification(javax.management.AttributeChangeNotification)

Aggregations

NotificationService (com.sun.appserv.management.base.NotificationService)6 ObjectName (javax.management.ObjectName)4 NotificationServiceMgr (com.sun.appserv.management.base.NotificationServiceMgr)3 AttributeChangeNotification (javax.management.AttributeChangeNotification)2 Notification (javax.management.Notification)2 QueryMgr (com.sun.appserv.management.base.QueryMgr)1 ProxyFactory (com.sun.appserv.management.client.ProxyFactory)1 NotificationServiceHelper (com.sun.appserv.management.helper.NotificationServiceHelper)1 IOException (java.io.IOException)1 InstanceNotFoundException (javax.management.InstanceNotFoundException)1