Documentation Archive Developer
Search
PATH Documentation > WebObjects

Table of Contents

EODistributionContext


Inherits from:
Object
Implements:
NSDisposable
Package:
com.webobjects.eodistribution


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" (page 31).



Interfaces Implemented


NSDisposable
dipose


Constructors



EODistributionContext

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

public com.webobjects.eodistribution.EODistributionContext( com.webobjects.appserver.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



addRemoteMethodReceiver

public void addRemoteMethodReceiver(Object target)

Adds the specified object to the list of targets that can receive remote method invocations.

delegate

public Object delegate()

Returns the receiver's delegate.

editingContext

public com.webobjects.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



remoteMethodReceivers

public NSArray remoteMethodReceivers()

Returns the list of targets that can receive remote method invocations.

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.webobjects.appserver.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.

RemoteMethodReceiverNeededNotification

This notification is broadcast when the client first invokes a remote method using the distribution context. The receiver of the notification should add a remote method receiver to the distribution context using the addRemoteMethodReceiver method.

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


Table of Contents