Package javax.enterprise.deploy.spi.status

Examples of javax.enterprise.deploy.spi.status.ProgressEvent


            deploymentStatus.setState(state); // retain current state
  }
       
        /* send notification */
  TargetModuleIDImpl tmi = new TargetModuleIDImpl(aTarget, moduleID);
  fireProgressEvent(new ProgressEvent(this, tmi, depStatus));
    }
View Full Code Here


     *@return ProgressObject set to FAILED with linked cause reporting full error info
     */
    private ProgressObject prepareErrorProgressObject (CommandType commandType, Throwable thr) {
        DeploymentStatus ds = new DeploymentStatusImplWithError(CommandType.DISTRIBUTE, thr);
        SimpleProgressObjectImpl progressObj = new SimpleProgressObjectImpl(ds);
        ProgressEvent event = new ProgressEvent(progressObj, null /*targetModuleID */, ds);
        progressObj.fireProgressEvent(event);
        return progressObj;
    }
View Full Code Here

        private final DeploymentStatus deploymentStatus;

        public ProgressObjectImpl(CommandType command, Set<TargetModuleID> targetModuleIds) {
            this.targetModuleIds = targetModuleIds;
            deploymentStatus = new DeploymentStatusImpl(command);
            event = new ProgressEvent(this, null, deploymentStatus);
        }
View Full Code Here

        }

        public ProgressObjectImpl(CommandType command, Exception exception) {
            this.targetModuleIds = null;
            deploymentStatus = new DeploymentStatusImpl(command, exception);
            event = new ProgressEvent(this, null, deploymentStatus);
        }
View Full Code Here

        private final DeploymentStatus deploymentStatus;

        public ProgressObjectImpl(CommandType command, Set<TargetModuleID> targetModuleIds) {
            this.targetModuleIds = targetModuleIds;
            deploymentStatus = new DeploymentStatusImpl(command);
            event = new ProgressEvent(this, null, deploymentStatus);
        }
View Full Code Here

        }

        public ProgressObjectImpl(CommandType command, Exception exception) {
            this.targetModuleIds = null;
            deploymentStatus = new DeploymentStatusImpl(command, exception);
            event = new ProgressEvent(this, null, deploymentStatus);
        }
View Full Code Here

    public void stop() throws OperationUnsupportedException {
        throw new OperationUnsupportedException("stop not supported");
    }

    public void addProgressListener(ProgressListener pol) {
        ProgressEvent event = null;
        synchronized (this) {
            listeners.add(pol);
            event = this.event;
        }
        if (event != null) {
View Full Code Here

        synchronized (this) {
            this.message = message;
            this.state = state;
            newStatus = new Status(command, action, state, message);
            toNotify = (ProgressListener[]) listeners.toArray(new ProgressListener[listeners.size()]);
            event = new ProgressEvent(this, null, newStatus);
        }

        for (int i = 0; i < toNotify.length; i++) {
            toNotify[i].handleProgressEvent(event);
        }
View Full Code Here

     */
    public void sendProgressEvent(StateType stateType, String message, TargetModuleID moduleID) {
        log.trace("sendProgressEvent, state: " + stateType + ", msg: " + message);
        deploymentStatus.setStateType(stateType);
        deploymentStatus.setMessage(message);
        ProgressEvent progressEvent = new ProgressEvent(this, moduleID, deploymentStatus);
        for (int i = 0; i < listeners.size(); i++) {
            ProgressListener progressListener = (ProgressListener) listeners.get(i);
            progressListener.handleProgressEvent(progressEvent);
        }
    }
View Full Code Here

    public void stop() throws OperationUnsupportedException {
        throw new OperationUnsupportedException("stop not supported");
    }

    public void addProgressListener(ProgressListener pol) {
        ProgressEvent event;
        synchronized (this) {
            listeners.add(pol);
            event = this.event;
        }
        if(event != null) {
View Full Code Here

TOP

Related Classes of javax.enterprise.deploy.spi.status.ProgressEvent

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.