Package org.glassfish.api.admin

Examples of org.glassfish.api.admin.ProgressStatus


        stat.setCurrentStepCount(source.getCurrentStepCount());
        if (source.isComplete()) {
            stat.complete();
        }
        for (ProgressStatusBase.ChildProgressStatus chld : source.getChildProgressStatuses()) {
            ProgressStatus dst = map.get(chld.getProgressStatus().getId());
            if (dst == null) {
                dst = stat.createChild(chld.getProgressStatus().getName(), chld.getAllocatedSteps());
                map.put(chld.getProgressStatus().getId(), dst);
            }
            mirror(chld.getProgressStatus(), dst);
View Full Code Here


     */
    public synchronized void mirror(ProgressStatusEvent event) {
        if (event == null) {
            return;
        }
        ProgressStatus effected = map.get(event.getSource().getId());
        boolean msgChanged = false;
        if (event.getChanged() != null && event.getChanged().size() > 0) {
            for (ProgressStatusEvent.Changed chng : event.getChanged()) {
                switch (chng) {
                    case NEW_CHILD:
                        effected = map.get(event.getParentSourceId());
                        if (effected != null) {
                            ProgressStatus child = effected.createChild(event.getSource().getName(), event.getAllocatedSteps());
                            map.put(event.getSource().getId(), child);
                            child.setTotalStepCount(event.getSource().getTotalStepCount());
                            child.setCurrentStepCount(event.getSource().getCurrentStepCount());
                            if (event.getSource().isCompleted()) {
                                child.complete();
                            }
                        }
                        break;
                    case COMPLETED:
                        effected.complete(event.getMessage());
View Full Code Here

        stat.setCurrentStepCount(dto.getCurrentStepCount());
        if (dto.isCompleted()) {
            stat.complete();
        }
        for (ProgressStatusDTO.ChildProgressStatusDTO chld : dto.getChildren()) {
            ProgressStatus dst = map.get(chld.getProgressStatus().getId());
            if (dst == null) {
                dst = stat.createChild(chld.getProgressStatus().getName(), chld.getAllocatedSteps());
                map.put(chld.getProgressStatus().getId(), dst);
            }
            mirror(chld.getProgressStatus(), dst);
View Full Code Here

        stat.setCurrentStepCount(source.getCurrentStepCount());
        if (source.isComplete()) {
            stat.complete();
        }
        for (ProgressStatusBase.ChildProgressStatus chld : source.getChildProgressStatuses()) {
            ProgressStatus dst = map.get(chld.getProgressStatus().getId());
            if (dst == null) {
                dst = stat.createChild(chld.getProgressStatus().getName(), chld.getAllocatedSteps());
                map.put(chld.getProgressStatus().getId(), dst);
            }
            mirror(chld.getProgressStatus(), dst);
View Full Code Here

     */
    public synchronized void mirror(ProgressStatusEvent event) {
        if (event == null) {
            return;
        }
        ProgressStatus effected = map.get(event.getSourceId());
        ProgressStatus result = event.apply(effected);
        if (event instanceof ProgressStatusEventCreateChild) {
            map.put(((ProgressStatusEventCreateChild) event).getChildId(), result);
        }
    }
View Full Code Here

        this.name = name;
    }
   
    @Override
    public ProgressStatus apply(ProgressStatus ps) {
        ProgressStatus chld;
        if (ps instanceof ProgressStatusBase) {
            ProgressStatusBase psb = (ProgressStatusBase) ps;
            chld = psb.createChild(name, allocatedSteps, totalSteps);
        } else {
            chld = ps.createChild(name, allocatedSteps);
            if (totalSteps >= 0) {
                chld.setTotalStepCount(totalSteps);
            }
        }
        return chld;
    }
View Full Code Here

TOP

Related Classes of org.glassfish.api.admin.ProgressStatus

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.