Package org.glassfish.api.admin.progress

Examples of org.glassfish.api.admin.progress.ProgressStatusDTO$ChildProgressStatusDTO


   
    @Override
    public synchronized void onAdminCommandEvent(String name, GfSseInboundEvent event) {
        try {
            if (CommandProgress.EVENT_PROGRESSSTATUS_STATE.equals(name)) {
                ProgressStatusDTO dto = event.getData(ProgressStatusDTO.class, MediaType.APPLICATION_JSON_TYPE);
                client.mirror(dto);
                commandProgress = (CommandProgress) client.getProgressStatus();
                if (StringUtils.ok(commandProgress.getName()) && !StringUtils.ok(commandProgress.getLastMessage())) {
                    commandProgress.progress(strings.getString("progressstatus.message.starting", "Starting"));
                }
View Full Code Here


   
    @Override
    public synchronized void onAdminCommandEvent(String name, GfSseInboundEvent event) {
        try {
            if (CommandProgress.EVENT_PROGRESSSTATUS_STATE.equals(name)) {
                ProgressStatusDTO dto = event.getData(ProgressStatusDTO.class, CONTENT_TYPE);
                client.mirror(dto);
                commandProgress = (CommandProgress) client.getProgressStatus();
                if (StringUtils.ok(commandProgress.getName()) && !StringUtils.ok(commandProgress.getLastMessage())) {
                    commandProgress.progress(strings.getString("progressstatus.message.starting", "Starting"));
                }
View Full Code Here

            jp.close();
        }
    }
   
    public static ProgressStatusEvent readProgressStatusEvent(JsonParser jp) throws IOException {
        ProgressStatusDTO source = null;
        List<Changed> changed = new ArrayList<Changed>();
        String message = null;
        boolean spinner = false;
        int allocatedSteps = 0;
        String parentId = null;
View Full Code Here

        ChildProgressStatusDTO child = readChildProgressStatus(jp);
        return child.getProgressStatus();
    }
   
    public static ChildProgressStatusDTO readChildProgressStatus(JsonParser jp) throws IOException {
        ProgressStatusDTO psd = new ProgressStatusDTO();
        int allocatedSteps = 0;
        while (jp.nextToken() != JsonToken.END_OBJECT) {
            String fieldname = jp.getCurrentName();
            jp.nextToken(); // move to value
            if ("name".equals(fieldname)) {
                psd.setName(jp.getText());
            } else if ("id".equals(fieldname)) {
                psd.setId(jp.getText());
            } else if ("total-step-count".equals(fieldname)) {
                psd.setTotalStepCount(jp.getIntValue());
            } else if ("current-step-count".equals(fieldname)) {
                psd.setCurrentStepCount(jp.getIntValue());
            } else if ("complete".equals(fieldname)) {
                psd.setCompleted(jp.getBooleanValue());
            } else if ("allocated-steps".equals(fieldname)) {
                allocatedSteps = jp.getIntValue();
            } else if ("children".equals(fieldname)) {
                while (jp.nextToken() != JsonToken.END_ARRAY) {
                    if (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ProgressStatusDTO.ChildProgressStatusDTO child = readChildProgressStatus(jp);
                        psd.getChildren().add(child);
                    }
                }
            }
        }
        return new ChildProgressStatusDTO(allocatedSteps, psd);
View Full Code Here

   
    @Override
    public synchronized void onAdminCommandEvent(String name, GfSseInboundEvent event) {
        try {
            if (CommandProgress.EVENT_PROGRESSSTATUS_STATE.equals(name)) {
                ProgressStatusDTO dto = event.getData(ProgressStatusDTO.class, MediaType.APPLICATION_JSON_TYPE);
                client.mirror(dto);
                commandProgress = (CommandProgress) client.getProgressStatus();
                if (StringUtils.ok(commandProgress.getName()) && !StringUtils.ok(commandProgress.getLastMessage())) {
                    commandProgress.progress(strings.getString("progressstatus.message.starting", "Starting"));
                }
View Full Code Here

            jp.close();
        }
    }
   
    public static ProgressStatusEvent readProgressStatusEvent(JsonParser jp) throws IOException {
        ProgressStatusDTO source = null;
        List<Changed> changed = new ArrayList<Changed>();
        String message = null;
        boolean spinner = false;
        int allocatedSteps = 0;
        String parentId = null;
View Full Code Here

            jp.close();
        }
    }
   
    public static ProgressStatusEvent readProgressStatusEvent(JsonParser jp) throws IOException {
        ProgressStatusDTO source = null;
        List<Changed> changed = new ArrayList<Changed>();
        String message = null;
        int allocatedSteps = 0;
        String parentId = null;
        while (jp.nextToken() != JsonToken.END_OBJECT) {
View Full Code Here

        ChildProgressStatusDTO child = readChildProgressStatus(jp);
        return child.getProgressStatus();
    }
   
    public static ChildProgressStatusDTO readChildProgressStatus(JsonParser jp) throws IOException {
        ProgressStatusDTO psd = new ProgressStatusDTO();
        int allocatedSteps = 0;
        while (jp.nextToken() != JsonToken.END_OBJECT) {
            String fieldname = jp.getCurrentName();
            jp.nextToken(); // move to value
            if ("name".equals(fieldname)) {
                psd.setName(jp.getText());
            } else if ("id".equals(fieldname)) {
                psd.setId(jp.getText());
            } else if ("total-step-count".equals(fieldname)) {
                psd.setTotalStepCount(jp.getIntValue());
            } else if ("current-step-count".equals(fieldname)) {
                psd.setCurrentStepCount(jp.getIntValue());
            } else if ("complete".equals(fieldname)) {
                psd.setCompleted(jp.getBooleanValue());
            } else if ("allocated-steps".equals(fieldname)) {
                allocatedSteps = jp.getIntValue();
            } else if ("children".equals(fieldname)) {
                while (jp.nextToken() != JsonToken.END_ARRAY) {
                    if (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ProgressStatusDTO.ChildProgressStatusDTO child = readChildProgressStatus(jp);
                        psd.getChildren().add(child);
                    }
                }
            }
        }
        return new ChildProgressStatusDTO(allocatedSteps, psd);
View Full Code Here

   
    @Override
    public synchronized void onAdminCommandEvent(String name, GfSseInboundEvent event) {
        try {
            if (CommandProgress.EVENT_PROGRESSSTATUS_STATE.equals(name)) {
                ProgressStatusDTO dto = event.getData(ProgressStatusDTO.class, MediaType.APPLICATION_JSON_TYPE);
                client.mirror(dto);
                commandProgress = (CommandProgress) client.getProgressStatus();
                if (StringUtils.ok(commandProgress.getName()) && !StringUtils.ok(commandProgress.getLastMessage())) {
                    commandProgress.progress(strings.getString("progressstatus.message.starting", "Starting"));
                }
View Full Code Here

        ChildProgressStatusDTO child = readChildProgressStatus(jp);
        return child.getProgressStatus();
    }

    public static ChildProgressStatusDTO readChildProgressStatus(JsonParser jp) throws IOException {
        ProgressStatusDTO psd = new ProgressStatusDTO();
        int allocatedSteps = 0;
        while (jp.nextToken() != JsonToken.END_OBJECT) {
            String fieldname = jp.getCurrentName();
            jp.nextToken(); // move to value
            if ("name".equals(fieldname)) {
                psd.setName(jp.getText());
            } else if ("id".equals(fieldname)) {
                psd.setId(jp.getText());
            } else if ("total-step-count".equals(fieldname)) {
                psd.setTotalStepCount(jp.getIntValue());
            } else if ("current-step-count".equals(fieldname)) {
                psd.setCurrentStepCount(jp.getIntValue());
            } else if ("complete".equals(fieldname)) {
                psd.setCompleted(jp.getBooleanValue());
            } else if ("allocated-steps".equals(fieldname)) {
                allocatedSteps = jp.getIntValue();
            } else if ("children".equals(fieldname)) {
                while (jp.nextToken() != JsonToken.END_ARRAY) {
                    if (jp.getCurrentToken() == JsonToken.START_OBJECT) {
                        ProgressStatusDTO.ChildProgressStatusDTO child = readChildProgressStatus(jp);
                        psd.getChildren().add(child);
                    }
                }
            }
        }
        return new ChildProgressStatusDTO(allocatedSteps, psd);
View Full Code Here

TOP

Related Classes of org.glassfish.api.admin.progress.ProgressStatusDTO$ChildProgressStatusDTO

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.