Package io.lumify.web.clientapi.model

Examples of io.lumify.web.clientapi.model.ClientApiLongRunningProcess


import org.json.JSONObject;

public class LongRunningProcessApiExt extends LongrunningprocessApi {
    public ClientApiLongRunningProcess waitById(String longRunningProcessId) throws ApiException {
        while (true) {
            ClientApiLongRunningProcess longRunningProcess = findById(longRunningProcessId);
            if (longRunningProcess.getEndTime() != null || longRunningProcess.getError() != null || longRunningProcess.isCanceled()) {
                return longRunningProcess;
            }
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
View Full Code Here


        }
    }

    public ClientApiLongRunningProcess findById(String longRunningProcessId) throws ApiException {
        String s = findByIdRaw(longRunningProcessId);
        ClientApiLongRunningProcess proc = ClientApiConverter.toClientApi(s, ClientApiLongRunningProcess.class);
        if (proc != null) {
            JSONObject json = new JSONObject(s);
            String resultString = json.optString("results");
            proc.setResultsString(resultString);
        }
        return proc;
    }
View Full Code Here

TOP

Related Classes of io.lumify.web.clientapi.model.ClientApiLongRunningProcess

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.