0,0 → 1,46 |
package net.outlyer.plugins.sandboxing; |
|
import net.outlyer.plugins.BasePluginObject; |
|
/** |
* Public methods provided by the sandbox. |
* Note that all methods in this interface imply a call to {@link #execute}. |
*/ |
public interface Sandbox extends RuntimeHooks, SandboxProperties { |
|
/** |
* @see #createDelayedImplementation(Class, boolean) |
*/ |
<T> T createDelayedImplementation(final Class<T> interfaceClass) throws PluginExecutionException; |
|
/** |
* Creates an implementation of an interface from JS code |
* @param interfaceClass Class of the interface to implement |
* @param allowPartialImplementation If true, the implementation would be used |
* even if incomplete (note that calling an unimplemented method will produce |
* an exception) |
* @return The implementation |
* @throws net.outlyer.plugins.sandboxing.PluginExecutionException |
*/ |
<T> T createDelayedImplementation(final Class<T> interfaceClass, boolean allowPartialImplementation) throws PluginExecutionException; |
|
/** |
* @see #createDelayedImplementation(Class, boolean) |
* @param fallbackObject If not null incomplete implementations are allowed and |
* calls to undefined methods will be passed to this object |
*/ |
<T> T createDelayedImplementation(final Class<T> interfaceClass, final T fallbackObject) throws PluginExecutionException; |
|
<T> T createDelayedImplementation(final Class<T> interfaceClass, final String objectName) throws PluginExecutionException; |
|
/** |
* Run the script |
*/ |
void execute() throws PluginExecutionException; |
|
/** |
* Obtains object contauning the plugin object |
* @return |
*/ |
BasePluginObject getPluginObject() throws PluginExecutionException; |
} |