PATH  WebObjects 4.5 Documentation > EODistribution Reference

Table of Contents

EODistributionContext.Delegate


(informal interface)
Package: com.apple.yellow.eodistribution.EODistributionContext

Interface Description


If a delegate object has been set, EODistributionContext sends messages to its delegate whenever the client either requests that a method be invoked on the server or asks the server to perform a fetch. The delegate can use these methods to preempt these operations, modify their results, or simply track activity.

Given that the client can ask the server to execute any method or perform a fetch using client-supplied SQL, some measure of security is needed. By default, the EODistributionContext only allows certain method invocations and a limited set of fetches. Each of the methods in this interface should return a boolean value to indicate whether the method execution or fetch should proceed.



Instance Methods



distributionContextDidReceiveData

public abstract NSData distributionContextDidReceiveData( EODistributionContext distributionContext, NSData data)

Invoked after distributionContext has received data. You can use this method and it's counterpart, distributionContextWillSendData, to implement encryption in client server communication, encrypting in distributionContextWillSendData and decrypting in distributionContextDidReceiveData.

distributionContextShouldAllowInvocation

public abstract boolean distributionContextShouldAllowInvocation( EODistributionContext distributionContext, Object targetObject, NSSelector aSelector, NSArray arguments)

Given that the client can ask to execute any method, some measure of security is needed. By default, the distribution center prevents the invocation of any method requested by the client unless the method name is prefixed with "clientSideRequest". In order to authorize other client-requested method invocations, specify an EODistributionContext delegate (usually the session) that implements the method distributionContextShouldAllowInvocation. Based upon the supplied target object, method selector, and arguments array, your delegate method should returntrue if the invocation should be allowed, orfalse if it should be blocked.

See Also: distributionContextShouldFollowKeyPath



distributionContextShouldFetchObjectsWithFetchSpecification

public abstract boolean distributionContextShouldFetchObjectsWithFetchSpecification( EODistributionContext distributionContext, com.apple.yellow.eocontrol.EOFetchSpecification fetchSpecification)

If implemented, this delegate method is invoked when the client asks to perform a fetch by passing a fetch specification to the server. Since a fetch specification can contain arbitrary SQL it may be dangerous to allow everything. The default behavior if the delegate does not implement this method is to authorize everything but raw rows, custom SQL and lock on fetch. Based upon the supplied fetch specification, your delegate method should return true if the fetch should be allowed, or false if not. The delegate can also modify the fetch specification if needed.

distributionContextShouldFollowKeyPath

public abstract boolean distributionContextShouldFollowKeyPath( EODistributionContext distributionContext, String path)

Given that the client can ask to execute any method on any key path, some measure of security is needed. By default, the distribution center prevents the invocation of any method on any key path requested by the client unless that key path is an empty string. In order to authorize other client-requested method invocations, specify an EODistributionContext delegate (usually the session) that implements the method distributionContextShouldFollowKeyPath. Based upon the supplied path, your delegate method should returntrue if the key path should be followed, or false if not.

See Also: distributionContextShouldAllowInvocation



distributionContextWillSendData

public abstract NSData distributionContextWillSendData( EODistributionContext distributionContext, NSData data)

Invoked before distributionContext sends data to the client. You can use this method and it's counterpart, distributionContextDidReceiveData, to implement encryption in client/server communication, encrypting in distributionContextWillSendData and decrypting in distributionContextDidReceiveData.


Table of Contents