API  0.9.10
CPNotificationQueue Class Reference

CPNotificationQueue objects act as buffers for notification centers (instances of CPNotificationCenter). More...

#import <CPNotificationQueue.h>

+ Inheritance diagram for CPNotificationQueue:

Instance Methods

(void) - dequeueNotificationsMatching:coalesceMask:
 
(void) - enqueueNotification:postingStyle:
 
(void) - enqueueNotification:postingStyle:coalesceMask:forModes:
 
(id) - initWithNotificationCenter:
 
- Instance Methods inherited from CPObject
(void) - addObserver:forKeyPath:options:context:
 
(void) - applyChange:toKeyPath:
 
(id) - autorelease
 
(id) - awakeAfterUsingCoder:
 
(void) - awakeFromCib
 
(void) - bind:toObject:withKeyPath:options:
 
(Class) - classForCoder
 
(Class) - classForKeyedArchiver
 
(CPString- className
 
(id) - copy
 
(void) - dealloc
 
(CPString- description
 
(CPDictionary- dictionaryWithValuesForKeys:
 
(void) - didChange:valuesAtIndexes:forKey:
 
(void) - didChangeValueForKey:
 
(void) - didChangeValueForKey:withSetMutation:usingObjects:
 
(void) - doesNotRecognizeSelector:
 
(CPArray) - exposedBindings
 
(id) - forwardingTargetForSelector:
 
(void) - forwardInvocation:
 
(unsigned) - hash
 
(BOOL) - implementsSelector:
 
(CPDictionary- infoForBinding:
 
(id) - init
 
(BOOL) - isEqual:
 
(BOOL) - isKindOfClass:
 
(BOOL) - isMemberOfClass:
 
(BOOL) - isProxy
 
(IMP) - methodForSelector:
 
(CPMethodSignature) - methodSignatureForSelector:
 
(id) - mutableArrayValueForKey:
 
(id) - mutableArrayValueForKeyPath:
 
(id) - mutableCopy
 
(id) - mutableSetValueForKey:
 
(id) - mutableSetValueForKeyPath:
 
(id) - performSelector:
 
(id) - performSelector:withObject:
 
(void) - performSelector:withObject:afterDelay:
 
(void) - performSelector:withObject:afterDelay:inModes:
 
(id) - performSelector:withObject:withObject:
 
(id) - performSelector:withObjects:
 
(void) - release
 
(void) - removeObserver:forKeyPath:
 
(id) - replacementObjectForArchiver:
 
(id) - replacementObjectForCoder:
 
(id) - replacementObjectForKeyedArchiver:
 
(BOOL) - respondsToSelector:
 
(id) - retain
 
(id) - self
 
(void) - setValue:forKey:
 
(void) - setValue:forKeyPath:
 
(void) - setValue:forUndefinedKey:
 
(void) - setValuesForKeysWithDictionary:
 
(CPString- UID
 
(void) - unbind:
 
(Class) - valueClassForBinding:
 
(id) - valueForKey:
 
(id) - valueForKeyPath:
 
(id) - valueForUndefinedKey:
 
(void) - willChange:valuesAtIndexes:forKey:
 
(void) - willChangeValueForKey:
 
(void) - willChangeValueForKey:withSetMutation:usingObjects:
 

Class Methods

(id) + defaultQueue
 
- Class Methods inherited from CPObject
(BOOL) + accessInstanceVariablesDirectly
 
(id) + alloc
 
(id) + allocWithCoder:
 
(BOOL) + automaticallyNotifiesObserversForKey:
 
(void) + cancelPreviousPerformRequestsWithTarget:
 
(void) + cancelPreviousPerformRequestsWithTarget:selector:object:
 
(Class) + class
 
(BOOL) + conformsToProtocol:
 
(void) + exposeBinding:
 
(void) + initialize
 
(IMP) + instanceMethodForSelector:
 
(BOOL) + instancesImplementSelector:
 
(BOOL) + instancesRespondToSelector:
 
(BOOL) + isBindingExclusive:
 
(BOOL) + isSubclassOfClass:
 
(CPSet) + keyPathsForValuesAffectingValueForKey:
 
(void) + load
 
(id) + new
 
(void) + object:performSelector:withObject:afterDelay:inModes:
 
(void) + setVersion:
 
(Class) + superclass
 
(int) + version
 

Detailed Description

CPNotificationQueue objects act as buffers for notification centers (instances of CPNotificationCenter).

Cappuccino provides a framework for sending messages between objects within a process called notifications. CPNotificationQueue objects (or simply notification queues) act as buffers for notification centers (instances of CPNotificationCenter). Whereas a notification center distributes notifications when posted, notifications placed into the queue can be delayed until the end of the current pass through the run loop or until the run loop is idle. Duplicate notifications can also be coalesced so that only one notification is sent although multiple notifications are posted. A notification queue maintains notifications (instances of C¨Notification) generally in a first in first out (FIFO) order. When a notification rises to the front of the queue, the queue posts it to the notification center, which in turn dispatches the notification to all objects registered as observers.

Definition at line 2 of file CPNotificationQueue.h.

Method Documentation

◆ defaultQueue()

+ (id) defaultQueue
implementation

Returns the application's notification queue. This notification queue uses the default notification center

Definition at line 103 of file CPNotificationQueue.j.

◆ dequeueNotificationsMatching:coalesceMask:()

- (void) dequeueNotificationsMatching: (CPNotification notification
coalesceMask: (CPUInteger)  coalesceMask 
implementation

Removes all notifications from the queue that match a provided notification using provided matching criteria.

Parameters
notificationthe notification to add to the queue
coalesceMaskmask indicating what criteria to use when matching attributes of notification to remove notifications in the queue.

Definition at line 192 of file CPNotificationQueue.j.

◆ enqueueNotification:postingStyle:()

- (void) enqueueNotification: (CPNotification notification
postingStyle: (CPPostingStyle)  postingStyle 
implementation

Adds a notification to the notification queue with a specified posting style.

Parameters
notificationthe notification to add to the queue
postingStylethe posting style for the notification

Definition at line 142 of file CPNotificationQueue.j.

◆ enqueueNotification:postingStyle:coalesceMask:forModes:()

- (void) enqueueNotification: (CPNotification notification
postingStyle: (CPPostingStyle)  postingStyle
coalesceMask: (CPNotificationCoalescing)  coalesceMask
forModes: (CPArray)  modes 
implementation

Adds a notification to the notification queue with a specified posting style, criteria for coalescing, and runloop mode.

Parameters
notificationthe notification to add to the queue
postingStylethe posting style for the notification
coalesceMaska mask indicating what criteria to use when matching attributes of notification to attributes notifications in the queue. modes the list of modes the notification may be posted in.

Definition at line 154 of file CPNotificationQueue.j.

◆ initWithNotificationCenter:()

- (id) initWithNotificationCenter: (CPNotificationCenter aNotificationCenter
implementation

Initializes and returns a notification queue for the specified notification center.

Parameters
anObserverthe specified notification center
Returns
a new CPNotificationQueue

Definition at line 120 of file CPNotificationQueue.j.


The documentation for this class was generated from the following files: