Search in sources :

Example 1 with ProgressStatusClient

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;
    }
}
Also used : ProgressStatusClient(com.sun.enterprise.admin.progress.ProgressStatusClient)

Example 2 with ProgressStatusClient

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);
        }
    });
}
Also used : ProgressStatusEvent(org.glassfish.api.admin.progress.ProgressStatusEvent) ProgressStatusBase(org.glassfish.api.admin.progress.ProgressStatusBase) ProgressStatusClient(com.sun.enterprise.admin.progress.ProgressStatusClient)

Aggregations

ProgressStatusClient (com.sun.enterprise.admin.progress.ProgressStatusClient)2 ProgressStatusBase (org.glassfish.api.admin.progress.ProgressStatusBase)1 ProgressStatusEvent (org.glassfish.api.admin.progress.ProgressStatusEvent)1