Inherits from: com.apple.client.eocontrol.EOObjectStore
Implements: NSInlineObservable
Package: com.apple.client.eodistribution
An EODistributedObjectStore functions as an object store on the Java client. It handles interaction with the distribution layer's channel (an EODistributionChannel object), incorporating knowledge of that channel so it can forward messages it receives from the server to its editing contexts and forward messages from its editing contexts to the server. With the channel, it represents a single connection to the server, fetching and saving objects on behalf of one or more client-side editing contexts. In this regard, an EODistributedObjectStore acts like an EODatabaseContext on the server; it differs from EODatabaseContext in that its editing contexts interact directly with it without the intervention of an object store coordinator.
EODistributedObjectStore provides several methods in addition to those defined by EOObjectStore. The invocation methods invokeRemoteMethod (two overloaded versions) and invokeRemoteMethodWithKeyPath allow you to send messages to any object on the server and receive responses from them. The methods classDescriptionForGlobalID and snapshotForSourceGlobalID return information related to enterprise objects in the distributed object store given an object's global ID.
Objects of this class are for use with Java Client only; there is no equivalent class for Yellow Box applications.
NSInlineObservableobserverData setObserverData
- Initializing objects
- initializeObject
- Getting objects
- objectsWithFetchSpecification
- objectsForSourceGlobalID
- Getting faults
- faultForGlobalID
- arrayFaultWithSourceGlobalID
- refaultObject
- Saving changes to objects
- saveChangesInEditingContext
- Invalidating objects
- invalidateAllObjects
- invalidateObjectsWithGlobalIDs
- Invoking methods on the server
- invokeRemoteMethod
- invokeRemoteMethodWithKeyPath
- Getting object data via global IDs
- classDescriptionForGlobalID
- snapshotForSourceGlobalID
public EODistributedObjectStore(EODistributionChannel aDistributionChannel)
public NSArray arrayFaultWithSourceGlobalID(
com.apple.client.eocontrol.EOGlobalID globalID,
String relationshipName,
com.apple.client.eocontrol.EOEditingContext editingContext)
See Also: faultForGlobalID, refaultObject
public com.apple.client.eocontrol.EOClassDescription classDescriptionForGlobalID(com.apple.client.eocontrol.EOGlobalID globalID)
See Also: snapshotForSourceGlobalID
public com.apple.client.eocontrol.EOEnterpriseObject faultForGlobalID(
com.apple.client.eocontrol.EOGlobalID globalID,
com.apple.client.eocontrol.EOEditingContext editingContext)
See Also: arrayFaultWithSourceGlobalID, refaultObject
public void initializeObject(
com.apple.client.eocontrol.EOEnterpriseObject anObject,
com.apple.client.eocontrol.EOGlobalID globalID,
com.apple.client.eocontrol.EOEditingContext editingContext)
See Also: classDescriptionForGlobalID
public void invalidateAllObjects()
See Also: invalidateObjectsWithGlobalIDs
public void invalidateObjectsWithGlobalIDs(NSArray gidArray)
public Object invokeRemoteMethod(
com.apple.client.eocontrol.EOEditingContext editingContext,
com.apple.client.eocontrol.EOGlobalID globalID,
String methodName,
Object[] arguments)
public Object invokeRemoteMethod(
com.apple.client.eocontrol.EOEditingContext editingContext,
com.apple.client.eocontrol.EOGlobalID globalID,
String methodName,
Object[] arguments,
boolean shouldPush)
The EODistributionContext on the server by default refuses the remote invocation unless methodName is prefixed with "clientSideRequest" or unless its delegate (usually the session object) implements the distributionContextShouldAllowInvocation method to return true. This mechanism exists to provide security on the server.
public Object invokeRemoteMethodWithKeyPath(
com.apple.client.eocontrol.EOEditingContext editingContext,
String keyPath,
String methodName,
Object[] arguments,
boolean shouldPush)
null
,
the method is invoked on the server side EODistributionContext.If an actual key path is specified, the EODistributionContext on the server blocks all invocations sent with this method unless methodName is prefixed with "clientSideRequest" or unless the EODistributionContext's delegate (on the server) implements distributionContextShouldAllowInvocation and distributionContextShouldFetchObjectsWithFetchSpecification. For security reasons, the delegate must authorize the invocation and the key path in these methods.
public NSArray objectsForSourceGlobalID(
com.apple.client.eocontrol.EOGlobalID globalID,
String relationshipName,
com.apple.client.eocontrol.EOEditingContext editingContext)
public NSArray objectsWithFetchSpecification(
com.apple.client.eocontrol.EOFetchSpecification fetchSpecification,
com.apple.client.eocontrol.EOEditingContext editingContext)
public void refaultObject(
com.apple.client.eocontrol.EOEnterpriseObject anObject,
com.apple.client.eocontrol.EOGlobalID globalID,
com.apple.client.eocontrol.EOEditingContext editingContext)
See Also: arrayFaultWithSourceGlobalID, faultForGlobalID
public void saveChangesInEditingContext(com.apple.client.eocontrol.EOEditingContext editingContext)
public NSArray snapshotForSourceGlobalID(
com.apple.client.eocontrol.EOGlobalID globalID,
String relationshipName)
See Also: classDescriptionForGlobalID
EOGlobalID's GlobalIDChangedNotification is posted when the global ID of an object in the store changes. See the EOGlobalID documentation for more information.
Notification Object | this |
userInfo Dictionary | None. |
Notification Object | this |
userInfo Dictionary | Use the old global ID as the key to find the new global ID. |
Notification Object | this |
userInfo Dictionary | The global IDs of inserted, deleted, updated, and invalidated objects, accessible with EOObjectStore's (respectively) InsertedKey, DeletedKey, UpdatedKey, and InvalidatedKey. |