PATH  WebObjects 4.5 Documentation > EODistribution Reference

Table of Contents

EODistributionContext


Inherits from: NSObject
Declared in: EOJavaClient/EODistributionContext.h




Class Description


An EODistributionContext object encodes data to send to the client and decodes data received from the client over the distribution channel. An EODistributionContext is also responsible for tracking the state of the server-side object graph and communicating any changes to the client, thus keeping the client and server object graphs in sync. EODistributionContext-or, if implemented, its delegate-validates remote invocations originating from client objects. The server-side EODistributionContext communicates with the EODistributedObjectStore on the client. See the EODistributionContext. Delegate protocol description for more information on security and validation.




Constants


The EODistributionContext.h header defines NSString constants for the names of the notifications it posts. For more information, see "Notifications" .



Instance Methods



delegate

- (id)delegate

Returns the receiver's delegate.

editingContext

- (EOEditingContext *)editingContext

Returns the receiver's editing context.

See Also: - initWithSession:editingContext:, - initWithSession:



initWithSession:

- (id)initWithSession:(WOSession *)session

Initializes a new EODistributionContext for use in session with session's default editing context.

initWithSession:editingContext:

- (id)initWithSession:(WOSession *)session editingContext:(EOEditingContext *)editingContext

Initializes a new EODistributionContext for use in session and with editingContext.

invocationTarget

- (id)invocationTarget

Returns the target object to which client requests are sent for processing.

See Also: - responseToClientMessage:



responseToClientMessage:

- (NSData *)responseToClientMessage:(NSData *)message

Called to generate the response to a client request. The target object specified with setInvocationTarget: is invoked with the client request, and the response returned by the target object is returned from this method.

See Also: - invocationTarget



session

- (WOSession *)session

Returns the receiver's session.

See Also: - initWithSession:editingContext:, - initWithSession:



setDelegate:

- (void)setDelegate:(id)delegate

Specifies that delegate should be used by the EODistributionContext to validate method invocations and fetches requested by the client. For more information, see the EODistributionContext. Delegate protocol specification.

See Also: - delegate



setInvocationTarget:

- (void)setInvocationTarget:(id)invocationTarget

Specifies the target object to which client requests are sent for processing.

See Also: - responseToClientMessage:




Notifications


EOLoadUserDefaultsNotification

Posted whenever a distribution context receives a request for user default values from a client application. Receivers can load default values (from a database, for example) and add them to the mutable dictionary provided in the notification's userInfo.
Notification object this
userInfo An NSDictionary containing a single entry with the key "defaults" and an NSMutableDictionary as the value. The keys to the mutable subdictionary are the names of the user defaults and the corresponding values are the default values themselves.

EOSaveUserDefaultsNotification

Posted whenever the distribution context receives user default values from a client application. Receivers can use this notification to store the default values (in a database, for example).
Notification object this
userInfo An NSDictionary containing a single entry with the key "defaults" and another NSDictionary as the value. The keys to the mutable subdictionary are the names of the user defaults and the corresponding values are the default values themselves.



Table of Contents