/** * Look up an implementation of the named process on the classpath. * * @param name Name of the Process to create * @return created process */ public static synchronized Process createProcess(Name name) { ProcessFactory factory = createProcessFactory(name); if (factory == null) return null; return factory.create(name); }
page.setLayout(new GridLayout(0, 2)); Process process = this.factory.create(name);
@Override public Process perform( ProcessFactory f, Name oldName, Name newName, Object... args) { return f.create(newName); } });
public Process create(Name name) { return delegate.create(name); }
@Override public Process create(Name name) { Process process = delegate.create(name); return new ProcessStartupWrapper(process); } }
/** * Look up an implementation of the named process. * * @param name Name of the Process to create * @return created process or null if not found */ public static Process createProcess(Name name) { ProcessFactory factory = createProcessFactory(name, false); if (factory == null) return null; return factory.create(name); }
public Process create(Name name) { if (selector.allowProcess(name)) { return delegate.create(name); } else { return null; } }
/** * Look up an implementation of the named process on the classpath. * @param name Name of the Process to create * @return created process */ public static synchronized Process createProcess(Name name){ ProcessFactory factory = createProcessFactory( name ); if( factory == null ) return null; return factory.create(name); }
public Process create(Name name) { if (selector.allowProcess(name)) { return delegate.create(name); } else { return null; } }
page.setLayout(new GridLayout(0, 2)); Process process = this.factory.create();
page.setLayout(new GridLayout(0, 2)); Process process = this.factory.create(name);
@Override public Map<String, Object> submitChained( String executionId, Name processName, Map<String, Object> inputs, ProgressListener listener) throws ProcessException { // straight execution, no thread pooling, we're already running in the parent process thread ProcessFactory pf = GeoServerProcessors.createProcessFactory(processName, true); if (pf == null) { throw new WPSException("No such process: " + processName); } // execute the process in the same thread as the caller Process p = pf.create(processName); Map<String, Object> result = p.execute(inputs, listener); return result; }
@Override public Map<String, Object> submitChained(String executionId, Name processName, Map<String, Object> inputs) throws ProcessException { // straight execution, no thread pooling, we're already running in the parent process thread ProcessListener listener = new ProcessListener(new ExecutionStatus(processName, executionId, ProcessState.RUNNING, 0)); ProcessFactory pf = Processors.createProcessFactory(processName); if (pf == null) { throw new WPSException("No such process: " + processName); } // execute the process in the same thread as the caller Process p = pf.create(processName); Map<String, Object> result = p.execute(inputs, listener); if (listener.exception != null) { throw new ProcessException("Process failed: " + listener.exception.getMessage(), listener.exception); } return result; }
@Override public Map<String, Object> call() throws Exception { try { // transfer the thread locals to this execution context threadLocalTransfer.apply(); ProcessFactory pf = GeoServerProcessors.createProcessFactory(processName, true); if (pf == null) { throw new WPSException("No such process: " + processName); } // execute the process Map<String, Object> result = null; Process p = pf.create(processName); result = p.execute(inputs, listener); return result; } finally { // clean up the thread locals threadLocalTransfer.cleanup(); } } }
@Override public Map<String, Object> call() throws Exception { resourceManager.setCurrentExecutionId(status.getExecutionId()); status.setPhase(ProcessState.RUNNING); ProcessListener listener = status.listener; Name processName = status.getProcessName(); ProcessFactory pf = Processors.createProcessFactory(processName); if (pf == null) { throw new WPSException("No such process: " + processName); } // execute the process Map<String, Object> result = null; try { Process p = pf.create(processName); result = p.execute(inputs, listener); if (listener.exception != null) { throw new WPSException("Process failed: " + listener.exception.getMessage(), listener.exception); } return result; } finally { // update status unless cancelled if (status.getPhase() == ProcessState.RUNNING) { status.setPhase(ProcessState.COMPLETED); } } }
InternalDistributedRenderProcess.class); final Name processName = new NameImpl("internal", "InternalDistributedRender"); final RenderingProcess process = (RenderingProcess) processFactory.create(processName); final Map<String, Parameter<?>> parameters = processFactory.getParameterInfo(processName); final InternalProcessFactory factory = new InternalProcessFactory();
void processDescription(CodeType id, ProcessDescriptionsType pds) { Name name = Ows11Util.name(id); ProcessFactory pf = GeoServerProcessors.createProcessFactory(name, true); if (pf == null || pf.create(name) == null) { throw new WPSException("No such process: " + id.getValue()); } ProcessDescriptionType pd = wpsf.createProcessDescriptionType(); pds.getProcessDescription().add(pd); pd.setProcessVersion("1.0.0"); pd.setIdentifier(Ows11Util.code(id.getValue())); pd.setTitle(Ows11Util.languageString(pf.getTitle(name))); pd.setAbstract(Ows11Util.languageString(pf.getDescription(name))); pd.setStatusSupported(true); pd.setStoreSupported(true); // data inputs DataInputsType inputs = wpsf.createDataInputsType(); pd.setDataInputs(inputs); dataInputs(inputs, pf, name); // process outputs ProcessOutputsType outputs = wpsf.createProcessOutputsType(); pd.setProcessOutputs(outputs); processOutputs(outputs, pf, name); }