FileDocCategorySizeDatePackage
NotificationServiceHelper.javaAPI DocGlassfish v2 API3286Fri May 04 22:30:50 BST 2007com.sun.appserv.management.helper

NotificationServiceHelper

public final class NotificationServiceHelper extends Object
Helps make it easier to get Notifications from a NotificationService

Fields Summary
final com.sun.appserv.management.base.NotificationService
mProxy
final Object
mBufferID
long
mNextSequenceNumber
Constructors Summary
public NotificationServiceHelper(com.sun.appserv.management.base.NotificationService proxy, Object bufferID)

		mProxy				= proxy;
		mBufferID			= bufferID;
		
		mNextSequenceNumber	= 0;
	
Methods Summary
public com.sun.appserv.management.base.NotificationServiceget()

		return( mProxy );
	
public javax.management.Notification[]getNotifications()
Get any outstanding Notifications and return them.

		final Map<String,Object>	result	=
			mProxy.getBufferNotifications( mBufferID, mNextSequenceNumber);
		
		final Long	nextSequenceNumber	= (Long)
			result.get( mProxy.NEXT_SEQUENCE_NUMBER_KEY );
		mNextSequenceNumber	= nextSequenceNumber.longValue();
		
		final Notification[]	notifs	=
			(Notification[])result.get( mProxy.NOTIFICATIONS_KEY );
		
		return( notifs );