/** * Creates a runtime object based using the class specified by {@code model}. * <p> * The {@code Jiffle} object must be compiled before calling this method. * * @param model the {@link Jiffle.RuntimeModel} * @return the runtime object * @throws JiffleException if the script has not been compiled or if errors * occur in creating the runtime instance */ public JiffleRuntime getRuntimeInstance(Jiffle.RuntimeModel model) throws it.geosolutions.jaiext.jiffle.JiffleException { return createRuntimeInstance(model, getRuntimeBaseClass(model), false); }
/** * Creates a runtime object based using the class specified by {@code model}. * <p> * The {@code Jiffle} object must be compiled before calling this method. * * @param model the {@link Jiffle.RuntimeModel} * @return the runtime object * @throws JiffleException if the script has not been compiled or if errors * occur in creating the runtime instance */ public JiffleRuntime getRuntimeInstance(Jiffle.RuntimeModel model) throws it.geosolutions.jaiext.jiffle.JiffleException { return createRuntimeInstance(model, getRuntimeBaseClass(model), false); }
/** * Gets the runtime object for this script. * <p> * The runtime object is an instance of {@link JiffleRuntime}. By default * it extends an abstract base class supplied JAI-tools: * {@link it.geosolutions.jaiext.jiffle.runtime.AbstractDirectRuntime} * when using the direct runtiem model or * {@link it.geosolutions.jaiext.jiffle.runtime.AbstractIndirectRuntime} * when using the indirect model. This method allows you to * specify a custom base class. The custom class must implement either * {@link JiffleDirectRuntime} or {@link JiffleIndirectRuntime}. * * @param <T> the runtime base class type * @param baseClass the runtime base class * * @return the runtime object * @throws JiffleException if the script has not been compiled or if errors * occur in creating the runtime instance */ public <T extends JiffleRuntime> T getRuntimeInstance(Class<T> baseClass) throws it.geosolutions.jaiext.jiffle.JiffleException { RuntimeModel model = RuntimeModel.get(baseClass); if (model == null) { throw new it.geosolutions.jaiext.jiffle.JiffleException(baseClass.getName() + " does not implement a required Jiffle runtime interface"); } return (T) createRuntimeInstance(model, baseClass, false); }
/** * Gets the runtime object for this script. * <p> * The runtime object is an instance of {@link JiffleRuntime}. By default * it extends an abstract base class supplied JAI-tools: * {@link it.geosolutions.jaiext.jiffle.runtime.AbstractDirectRuntime} * when using the direct runtiem model or * {@link it.geosolutions.jaiext.jiffle.runtime.AbstractIndirectRuntime} * when using the indirect model. This method allows you to * specify a custom base class. The custom class must implement either * {@link JiffleDirectRuntime} or {@link JiffleIndirectRuntime}. * * @param <T> the runtime base class type * @param baseClass the runtime base class * * @return the runtime object * @throws JiffleException if the script has not been compiled or if errors * occur in creating the runtime instance */ public <T extends JiffleRuntime> T getRuntimeInstance(Class<T> baseClass) throws it.geosolutions.jaiext.jiffle.JiffleException { RuntimeModel model = RuntimeModel.get(baseClass); if (model == null) { throw new it.geosolutions.jaiext.jiffle.JiffleException(baseClass.getName() + " does not implement a required Jiffle runtime interface"); } return (T) createRuntimeInstance(model, baseClass, false); }