PATH  WebObjects 4.5 Documentation > EODistribution Reference

Table of Contents

EODistributionContext


Inherits from: NSObject
Package: com.apple.yellow.eodistribution.EODistributionContext


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 interface description for more information on security and validation.




Constants


EODistributionContext defines String constants for the names of the notifications it posts. For more information, see "Notifications" .



Constructors



EODistributionContext

public com.apple.yellow.eodistribution.EODistributionContext( com.apple.yellow.webobjects.WOSession session, com.apple.yellow.eocontrol.EOEditingContext editingContext)

public com.apple.yellow.eodistribution.EODistributionContext( com.apple.yellow.webobjects.WOSession session)

Creates a new EODistributionContext for use within session and with editingContext, if provided, or with session's default editing context otherwise.


Instance Methods



delegate

public Object delegate()

Returns the receiver's delegate.

editingContext

public com.apple.yellow.eocontrol.EOEditingContext editingContext()

Returns the receiver's editing context.

See Also: EODistributionContext constructor



invocationTarget

public Object invocationTarget()

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

See Also: responseToClientMessage



responseToClientMessage

public 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

public com.apple.yellow.webobjects.WOSession session()

Returns the receiver's session.

See Also: EODistributionContext constructor



setDelegate

public void setDelegate(Object 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 interface specification.

See Also: delegate



setInvocationTarget

public void setInvocationTarget(Object invocationTarget)

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

See Also: responseToClientMessage




Notifications


LoadUserDefaultsNotification

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.

SaveUserDefaultsNotification

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