ice.util.security
Interface BoxedCode
- public interface BoxedCode
A code to run with privileges dropped or gained. It is invoked via
SecurityKit.doUntrusted/SecurityKit.doPrivileged by passing BoxedCode implementation. If you need to call code that throws a checked exception,
you need to catch it and rethrow via ProxyException.
This provides the same functionality as java.security.PrivilegedAction
interface from JDK 1.2 but it also works in JDK 1.1 and it has less misleading
name then PrivilegedAction when used to drop code privileges.
run
public Object run()
- Run the code. It is called after SecurityKit.doPrivileged enabled
privileges or SecurityKit.doUntrusted dropped them.