net.sf.container
Interface Container

All Known Implementing Classes:
ContainerImp

public interface Container

Containers provide with a way to execute user code within such runtime restrictions that are defined by the container policy itself.

Usually they would represent a sandbox environment with lesser freedom than currently running process has.
Opposite would be possible only if in the system wide policy Container code has been given greater permission set than currently running has.

All access in JVM is governed by java.lang.SecurityManagerjava.security.Policy.
Containers execute the user code in a permission set defined by ContainerFactory. Factories itself could provide these definitions in adhoc manner and without a need to alter the system wide policy. created on Jun 9, 2005

Since:
Version:
$Revision: 1.1 $
Author:
fiykov
See Also:
ContainerImp

Method Summary
 java.lang.Object doPrivileged(java.security.PrivilegedAction action)
          execute a code without throwing any exceptions
 java.lang.Object doPrivileged(java.security.PrivilegedExceptionAction action)
          execute a code and throw execution exception if happens
 void doPrivileged(java.lang.Runnable action)
          execute a code without throwing any exceptions
 

Method Detail

doPrivileged

void doPrivileged(java.lang.Runnable action)
execute a code without throwing any exceptions

Parameters:
action - to execute

doPrivileged

java.lang.Object doPrivileged(java.security.PrivilegedAction action)
execute a code without throwing any exceptions

Parameters:
action - to execute
Returns:
the result of the action if any

doPrivileged

java.lang.Object doPrivileged(java.security.PrivilegedExceptionAction action)
                              throws java.security.PrivilegedActionException
execute a code and throw execution exception if happens

Parameters:
action - to execute
Returns:
the result of the action if any
Throws:
java.security.PrivilegedActionException


Copyright © 2007 Nikolay Fiykov. All Rights Reserved.