Fred Oliver wrote:
If I have a delegate for a complex object (say Socket) to which sets
of permissions may apply, how would the delegate handle the sets? If
one SocketPermission were revoked, does the delegate need deep
knowledge of the object it protects to determine if that revoked
permission applies? Can a delegate always obtain the complete set of
permissions which apply to it to reevaluate more fully?
Hi Fred, I don't think I answered this one properly, the delegate could
handle the set's of Permission's by obtaining an ExecutionContextManager
for each Permission.
So for dynamically granted Socket Permission's the delegate would create
the ExecutionContextManager and hold it for the duration required for a
particular environment.
The Socket delegate may also create other delegates for other objects
that it returns, such as InputStream.
I'll upload the code to svn shortly.
Cheers,
Peter.