org.rythmengine.sandbox
Class SandboxExecutingService

java.lang.Object
  extended by org.rythmengine.sandbox.SandboxExecutingService

public class SandboxExecutingService
extends Object

A secure executing service run template in a separate thread in case there are infinite loop, and also set the SecurityManager in the executing thread


Constructor Summary
SandboxExecutingService(int poolSize, SandboxThreadFactory fact, long timeout, RythmEngine re, String code)
           
 
Method Summary
 String execute(Map<String,Object> context, File template, Object... args)
           
 String execute(Map<String,Object> context, String template, Object... args)
           
 Future<Object> executeAsync(ITemplate t)
           
protected  void finalize()
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SandboxExecutingService

public SandboxExecutingService(int poolSize,
                               SandboxThreadFactory fact,
                               long timeout,
                               RythmEngine re,
                               String code)
Method Detail

execute

public String execute(Map<String,Object> context,
                      File template,
                      Object... args)

execute

public String execute(Map<String,Object> context,
                      String template,
                      Object... args)

executeAsync

public Future<Object> executeAsync(ITemplate t)

shutdown

public void shutdown()

finalize

protected void finalize()
                 throws Throwable
Overrides:
finalize in class Object
Throws:
Throwable


Copyright © 2013. All Rights Reserved.