use of com.sun.enterprise.admin.progress.ProgressStatusClient in project Payara by payara.
the class ProgressStatusPrinter method reset.
public synchronized void reset() {
client = new ProgressStatusClient(null);
commandProgress = null;
lastMessage = null;
lastMsgLength = 0;
firstPrint = true;
if (this.ticker != null) {
this.ticker.stopit();
this.ticker = null;
}
}
use of com.sun.enterprise.admin.progress.ProgressStatusClient in project Payara by payara.
the class CommandRunnerProgressHelper method connectWithClientProgressStatus.
private void connectWithClientProgressStatus(Job commandInstance, ProgressStatus clientProgressStatus) {
if (clientProgressStatus == null) {
return;
}
final ProgressStatusClient psc = new ProgressStatusClient(clientProgressStatus);
commandInstance.getEventBroker().registerListener(CommandProgress.EVENT_PROGRESSSTATUS_STATE, new AdminCommandEventBroker.AdminCommandListener<ProgressStatusBase>() {
@Override
public void onAdminCommandEvent(String name, ProgressStatusBase event) {
psc.mirror(event);
}
});
commandInstance.getEventBroker().registerListener(CommandProgress.EVENT_PROGRESSSTATUS_CHANGE, new AdminCommandEventBroker.AdminCommandListener<ProgressStatusEvent>() {
@Override
public void onAdminCommandEvent(String name, ProgressStatusEvent event) {
psc.mirror(event);
}
});
}
Aggregations