AsyncAutoCrudServlet.java 2.21 KB
Newer Older
Spencer Chang's avatar
Spencer Chang committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package leaf.service.http.async;

import leaf.service.IService;
import leaf.service.http.AutoCrudServlet;
import uncertain.proc.IProcedureManager;
import uncertain.proc.IProcedureRegistry;

import javax.servlet.AsyncContext;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;


public class AsyncAutoCrudServlet extends AutoCrudServlet implements IFacadeServlet {
    public AsyncAutoCrudServlet() {
    }

    public void init(ServletConfig config) throws ServletException {
        super.init(config);
    }

    public void doService(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        if (!this.mUncertainEngine.isRunning()) {
            StringBuffer msg = new StringBuffer("Application failed to initialize");
            Throwable thr = this.mUncertainEngine.getInitializeException();
            if (thr != null) {
                msg.append(":").append(thr.getMessage());
            }

            response.sendError(500, msg.toString());
        } else {
            AsyncContext context = request.startAsync();
        }
    }

    public IService createServiceInstance(HttpServletRequest request, HttpServletResponse response) throws Exception {
        return super.createServiceInstance(request, response);
    }

    public void populateService(HttpServletRequest request, HttpServletResponse response, IService service) throws Exception {
        super.populateService(request, response, service);
    }

    public void handleException(HttpServletRequest request, HttpServletResponse response, Throwable ex) {
        try {
            super.handleException(request, response, ex);
        } catch (Exception var5) {
            ex.printStackTrace();
        }

    }

    public void cleanUp(IService svc) {
        super.cleanUp(svc);
    }

    public IProcedureRegistry getProcedureRegistry() {
        return super.mProcRegistry;
    }

    public IProcedureManager getProcedureManager() {
        return super.mProcManager;
    }
}