Up

NSNotificationQueue class reference

Authors

Mircea Oancea (mircea@jupiter.elcom.pub.ro)
Richard Frith-Macdonald (richard@brainstorm.co.uk)

Version: 31173

Date: 2010-08-17 08:35:20 +0100 (Tue, 17 Aug 2010)

Copyright: (C) 1995-1999 Free Software Foundation, Inc.

Software documentation for the NSNotificationQueue class

NSNotificationQueue : NSObject

Declared in:
Foundation/NSNotificationQueue.h
Availability: OpenStep

This class supports asynchronous posting of NSNotification s to an NSNotificationCenter . The method to add a notification to the queue returns immediately. The queue will periodically post its oldest notification to the notification center. In a multithreaded process, notifications are always sent on the thread that they are posted from.

Instance Variables

Method summary

defaultQueue 

+ (NSNotificationQueue*) defaultQueue;
Availability: OpenStep

Returns the default notification queue for use in this thread. It will always post notifications to the default notification center (for the entire task, which may have multiple threads and therefore multiple notification queues).

dequeueNotificationsMatching: coalesceMask: 

- (void) dequeueNotificationsMatching: (NSNotification*)notification coalesceMask: (NSUInteger)coalesceMask;
Availability: OpenStep

Immediately remove all notifications from queue matching notification on name and/or object as specified by coalesce mask, which is an OR (' | ') of the options NSNotificationCoalescingOnName, NSNotificationCoalescingOnSender (object), and NSNotificationNoCoalescing (match only the given instance exactly). If both of the first options are specified, notifications must match on both attributes (not just either one). Removed notifications are not posted.

enqueueNotification: postingStyle: 

- (void) enqueueNotification: (NSNotification*)notification postingStyle: (NSPostingStyle)postingStyle;
Availability: OpenStep

Sets notification to be posted to notification center at time dependent on postingStyle, which may be either NSPostNow (synchronous post), NSPostASAP (post soon), or NSPostWhenIdle (post when runloop is idle).

enqueueNotification: postingStyle: coalesceMask: forModes: 

- (void) enqueueNotification: (NSNotification*)notification postingStyle: (NSPostingStyle)postingStyle coalesceMask: (NSUInteger)coalesceMask forModes: (NSArray*)modes;
Availability: OpenStep

Sets notification to be posted to notification center at time dependent on postingStyle, which may be either NSPostNow (synchronous post), NSPostASAP (post soon), or NSPostWhenIdle (post when runloop is idle). coalesceMask determines whether this notification should be considered same as other ones already on the queue, in which case they are removed through a call to -dequeueNotificationsMatching:coalesceMask: . The modes argument determines which NSRunLoop mode notification may be posted in ( nil means NSDefaultRunLoopMode).

initWithNotificationCenter: 

- (id) initWithNotificationCenter: (NSNotificationCenter*)notificationCenter;
Availability: OpenStep

Initialize a new instance to post notifications to the given notificationCenter (instead of the default).



Instance Variables for NSNotificationQueue Class

_asapQueue

@public struct _NSNotificationQueueList* _asapQueue;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_center

@public NSNotificationCenter* _center;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_idleQueue

@public struct _NSNotificationQueueList* _idleQueue;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.

_zone

@public NSZone* _zone;
Availability: OpenStep

Warning the underscore at the start of the name of this instance variable indicates that, even though it is not technically private, it is intended for internal use within the package, and you should not use the variable in other code.





Up