PATH  WebObjects 4.0 Documentation > WebObjects Framework Reference



WOAdaptor

Inherits From:
NSObject

Conforms To: NSObject (NSObject)

Declared in: WebObjects/WOAdaptor.h


Class Description

WOAdaptor is an abstract class that represents objects that can receive events from a WebObjects adaptor. A WebObjects adaptor is a process that handles communication between the server and a WebObjects application. The WebObjects application (a WOApplication instance) communicates with the adaptor using messages defined in the WOAdaptor class.

The purpose of the WOAdaptor class is to perform these tasks:


Method Types

Creation
- initWithName:arguments:
Obtaining attributes
- doesBusyRunOnce
- dispatchesRequestsConcurrently
Event registering
- registerForEvents
- unregisterForEvents
Running
- runOnce

Instance Methods


doesBusyRunOnce

- (BOOL)doesBusyRunOnce

Returns whether repeatedly invoking runOnce would result in busy waiting.


dispatchesRequestsConcurrently

- (BOOL)dispatchesRequestsConcurrently

Returns YES if the adaptor is multi-threaded, NO otherwise. If the adaptor is multi-threaded, the adaptor may dispatch requests to the application concurrently in separate threads.

See also: - adaptorsDispatchRequestsConcurrently (WOApplication)


initWithName:arguments:

- (id)initWithName:(NSString *)aName arguments:(NSDictionary *)someArguments

Initializes a WOAdaptor with the name aName and arguments someArguments. aName is the name of the WOAdaptor subclass. someArguments are the default options specified for this adaptor (such as port number and listen queue depth).

The WOApplication method adaptorWithName:arguments: invokes this message when it encounters an WOAdaptor option on the command line. The WOApplication retains each of its WOAdaptors.

See also: - adaptorWithName:arguments: (WOApplication)


registerForEvents

- (void)registerForEvents

Performs any actions necessary to have the WOAdaptor start receiving events.

See also: - runLoop in WOApplication


runOnce

- (void)runOnce

Invoked by the application's main loop

See also: - doesBusyRunOnce


unregisterForEvents

- (void)unregisterForEvents

Undoes the actions performed in registerForEvents so that the WOAdaptor stops receiving events.





Copyright © 1998, Apple Computer, Inc. All rights reserved.