PATH Documentation > WebObjects

Table of Contents

NSDelayedCallbackCenter


Inherits from:
Object
Package:
com.webobjects.foundation


Class Description


An NSDelayedCallbackCenter object (also called a delayed callback center) provides a way to guarantee that particular methods are invoked after an event has ended. You can register selectors with the delayed callback center. The center, in turn, invokes them when the event ends. In WebObjects, this happens at then end of the current WebObjects request-response cycle.

When you register a selector, you also specify a priority, which determines the order in which it is invoked relative to the other selectors. The selectors are invoked in order of ascending priority. To register a selector with the delayed callback center, use performSelector. To cancel it before the event ends, use cancelPerformSelector.

The event loop invokes eventEnded to indicate that the current event has ended. The eventEnded method invokes the queued selectors.

Each task has a default delayed callback center that you access with the defaultCenter static method.




Method Types


Accessing the default center
defaultCenter
Managing selectors
cancelPerformSelector
performSelector
Indicating the end of an event
eventEnded


Static Methods



defaultCenter

public static NSDelayedCallbackCenter defaultCenter()

Returns the current task's delayed callback center.


Instance Methods



cancelPerformSelector

public void cancelPerformSelector( NSSelector selector, Object target, Object argument)

Removes the specified selector with the specified target object and argument from the list of registered selectors.

eventEnded

public void eventEnded()

Invokes the registered selectors in order of ascending priority. The event loop should invoke this method when the current event ends.

performSelector

public void performSelector( NSSelector selector, Object target, Object argument, int priority)

Registers selector to be invoked on target with the specified argument and priority. When the current event ends, the registered selectors are invoked in order of ascending priority.

© 2001 Apple Computer, Inc. (Last Published April 17, 2001)


Table of Contents