|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.wotonomy.foundation.NSNotificationQueue
public class NSNotificationQueue
NSNotificationQueue coalesces notifications to be posted to the NSNotificationCenter and can post them asynchronously. While calling postNotification on the notification center does not return until all receivers have been notified, calling enqueueNotification can return immediately. Use this class when you want to coalesce notifications or notify asynchronously, or both, which is the typical case.
Field Summary | |
---|---|
static int |
NotificationCoalescingOnName
Used to indicate that this notification should be coalesced with other notifications with the same name. |
static int |
NotificationCoalescingOnSender
Used to indicate that this notification should be coalesced with other notifications with the same object argument (which is typically the sender). |
static int |
NotificationNoCoalescing
Used to indicate that this notification should not be coalesced with other notifications. |
static int |
PostASAP
Posting style specifying that the notification should be posted on the next available event loop. |
static int |
PostNow
Posting style specifying that the notification should be posted immediately. |
static int |
PostWhenIdle
Posting style specifying that the notification should be posted on the next available idle loop. |
Constructor Summary | |
---|---|
NSNotificationQueue()
Default constructor creates a new notification queue that uses the default notification center. |
|
NSNotificationQueue(NSNotificationCenter aCenter)
Creates a new notification queue that uses the specified notification center. |
Method Summary | |
---|---|
static NSNotificationQueue |
defaultQueue()
Returns the system default queue, creating one if it has not yet been created. |
void |
dequeueMatchingNotifications(NSNotification aNotification,
int aCoalesceMask)
Removes notifications from the queue that match the specified notification, considering the specified coalesce mask. |
void |
enqueueNotification(NSNotification aNotification,
int aPostingStyle)
Adds the notification to the queue to be run at the time specified by the posting style. |
void |
enqueueNotificationWithCoalesceMaskForModes(NSNotification aNotification,
int aPostingStyle,
int aCoalesceMask,
java.util.List aModeList)
Adds the notification to the queue to be run at the time specified by the posting style and coelesced as the specified mask indicates. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PostASAP
public static final int PostWhenIdle
public static final int PostNow
public static final int NotificationNoCoalescing
public static final int NotificationCoalescingOnName
public static final int NotificationCoalescingOnSender
Constructor Detail |
---|
public NSNotificationQueue()
public NSNotificationQueue(NSNotificationCenter aCenter)
Method Detail |
---|
public static NSNotificationQueue defaultQueue()
public void dequeueMatchingNotifications(NSNotification aNotification, int aCoalesceMask)
public void enqueueNotification(NSNotification aNotification, int aPostingStyle)
public void enqueueNotificationWithCoalesceMaskForModes(NSNotification aNotification, int aPostingStyle, int aCoalesceMask, java.util.List aModeList)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |