use of javax.enterprise.deploy.shared.StateType in project Payara by payara.
the class ProgressObjectImpl method fireProgressEvent.
/**
* Notifies all listeners that have registered interest for ProgressEvent notification.
*/
protected void fireProgressEvent(StateType state, String message, TargetImpl aTarget) {
StateType stateToBroadcast = (state != null) ? state : deploymentStatus.getState();
/* new copy of DeploymentStatus */
DeploymentStatusImpl depStatus = new DeploymentStatusImpl(this);
depStatus.setState(stateToBroadcast);
depStatus.setMessage(message);
/*
*Update this progress object's status before notifying listeners.
*/
if (state != null) {
deploymentStatus.setMessage(message);
// retain current state
deploymentStatus.setState(state);
}
/* send notification */
TargetModuleIDImpl tmi = new TargetModuleIDImpl(aTarget, moduleID);
fireProgressEvent(new ProgressEvent(this, tmi, depStatus));
}
Aggregations