Package com.enioka.jqm.api

Examples of com.enioka.jqm.api.JobRequest


    @Override
    public void start()
    {
        System.out.println("PARAMETRE FIBO 2: " + this.getParameters().get("p2"));

        JobRequest jd = new JobRequest("FiboHib", "Jean Paul");

        jd.addParameter("p1", this.getParameters().get("p2"));
        jd.addParameter("p2", (Integer.parseInt(this.getParameters().get("p1")) + Integer.parseInt(this.getParameters().get("p2")) + ""));
        System.out.println("BEFORE ENQUEUE");

        if (Integer.parseInt(this.getParameters().get("p1")) <= 100)
        {
            JqmClientFactory.getClient().enqueue(jd);
View Full Code Here


        return this;
    }

    public String enqueue()
    {
        JobRequest jr = new JobRequest(this.selected.getApplicationName(), this.userName);
        int i = JqmClientFactory.getClient().enqueue(jr);

        FacesMessage msg = new FacesMessage("Enqueue done", "request number " + i);
        FacesContext.getCurrentInstance().addMessage(null, msg);
View Full Code Here

        return this;
    }

    public String enqueue()
    {
        JobRequest jr = new JobRequest(this.selected.getApplicationName(), this.userName);
        int i = JqmClientFactory.getClient().enqueue(jr);

        FacesMessage msg = new FacesMessage("Enqueue done", "request number " + i);
        FacesContext.getCurrentInstance().addMessage(null, msg);
View Full Code Here

    }

    private Integer enqueue(String applicationName, String user, String mail, String sessionId, String application, String module,
            String keyword1, String keyword2, String keyword3, Map<String, String> parameters)
    {
        JobRequest jr = new JobRequest(applicationName, user, mail);
        jr.setApplicationName(applicationName);
        jr.setUser(user == null ? ji.getUserName() : user);
        jr.setEmail(mail);
        jr.setSessionID(sessionId == null ? this.sessionId : sessionId);
        jr.setApplication(application == null ? jd.getApplication() : application);
        jr.setModule(module == null ? jd.getModule() : module);
        jr.setKeyword1(keyword1);
        jr.setKeyword2(keyword2);
        jr.setKeyword3(keyword3);
        jr.setParentID(this.ji.getId());
        jr.setParameters(parameters);

        return getJqmClient().enqueue(jr);
    }
View Full Code Here

    {
        String applicationName = req.getParameter("applicationname");
        // If authentication is used one day, replace this line by the name from the context
        String user = req.getParameter("user");

        JobRequest jd = new JobRequest(applicationName, user);

        jd.setModule(req.getParameter("module"));
        jd.setEmail(req.getParameter("mail"));
        jd.setModule(req.getParameter("module"));
        jd.setKeyword1(req.getParameter("other1"));
        jd.setKeyword2(req.getParameter("other2"));
        jd.setKeyword3(req.getParameter("other3"));
        if (req.getParameter("parentid") != null)
        {
            jd.setParentID(Integer.parseInt(req.getParameter("parentid")));
        }
        jd.setSessionID(req.getParameter("sessionid"));

        int j = 0;
        while (req.getParameter("param_" + j) != null)
        {
            j++;
            jd.addParameter(req.getParameter("param_" + j), req.getParameter("paramvalue_" + j));
        }

        int i = JqmClientFactory.getClient().enqueue(jd);
        resp.getWriter().write("" + i);
        resp.getWriter().close();
View Full Code Here

        em.createQuery("SELECT e from Entity e");

        if (this.getParameters().size() == 0)
        {
            log.info("Queuing again - with parameter and through he old API");
            JobRequest jd = new JobRequest("jqm-test-em", "marsu");
            jd.addParameter("stop", "1");
            JqmClientFactory.getClient().enqueue(jd);
        }
        log.info("End of payload");
    }
View Full Code Here

TOP

Related Classes of com.enioka.jqm.api.JobRequest

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.