32,12 → 32,28 |
* it enables exported objects to retrieve the sandbox object in which they're |
* being executed. |
* |
* Implementors must contain a field exactly: |
* Implementors must contain a field like |
* <pre> |
* public Object sandboxGetter = null; |
* </pre> |
* |
* public Callable<Sandbox> _getSandbox = null; |
* |
* sandboxGetter MUST be public, it can be of class Object or |
* Callable<Sandbox>, but shouldn't be used directly, instead, if required, |
* use SandboxAccessorImpl#getSandbox(SandboxAccessor) to retrieve it's |
* value, or inherit from SandboxAccessorImpl to be able to use |
* SandboxAccessorImpl#getSandbox(). |
* <br /> |
* Implementation notes: It will be dynamically initialised, no user |
* initialisation is required. |
* |
* The convenience default implementation, {@link SandboxAccessorImpl} can |
* be used as a base class if that's possible, to hide such requirement. |
*/ |
public interface SandboxAccessor { |
/** |
* Obtains the associated sanbdox. |
* Implementors can use {@link SandboxAccessor#getSandbox(SandboxAccessor)}. |
* @return The sandbox |
*/ |
public Sandbox getSandbox(); |
} |