/** * Asynchronously process the given document operations as one unit * using the processing chain of this service, * and call the specified ProcessingEndpoint when done. * * @throws RuntimeException caused by a QueueFullException if this DocprocService has a bounded input queue and the queue is full * @throws IllegalStateException if this DocprocService is not accepting new incoming processings */ public void processDocumentOperations(List<DocumentOperation> documentOperations, ProcessingEndpoint endp) { addProcessing(Processing.createProcessingFromDocumentOperations(getName(), documentOperations, new CallStack(getCallStack()), endp)); }
/** * Asynchronously process the given document put or document update using the processing * chain of this service, and call the specified ProcessingEndpoint when done. * * @throws RuntimeException caused by a QueueFullException if this DocprocService has a bounded input queue and the queue is full * @throws IllegalStateException if this DocprocService is not accepting new incoming processings */ public void process(DocumentOperation documentOperation, ProcessingEndpoint endp) { addProcessing(new Processing(getName(), documentOperation, new CallStack(getCallStack()), endp)); }
/** * Asynchronously process the given Processing using the processing * chain of this service, and call the specified ProcessingEndpoint when done. * * @throws RuntimeException caused by a QueueFullException if this DocprocService has a bounded input queue and the queue is full * @throws IllegalStateException if this DocprocService is not accepting new incoming processings */ public void process(Processing processing, ProcessingEndpoint endp) { processing.setServiceName(getName()); processing.setCallStack(new CallStack(getCallStack())); processing.setEndpoint(endp); addProcessing(processing); }
private static JSONObject renderDocprocChains(Container container) { JSONObject ret = new JSONObject(); for (RequestHandler h : container.getRequestHandlerRegistry().allComponents()) { if (h instanceof DocumentProcessingHandler) { ComponentRegistry<DocprocService> registry = ((DocumentProcessingHandler) h).getDocprocServiceRegistry(); for (DocprocService service : registry.allComponents()) { putJson(ret, service.getId().stringValue(), renderCalls(service.getCallStack().iterator())); } } } return ret; }