Examples of AdminCommandState


Examples of org.glassfish.api.admin.AdminCommandState

    }

    @Override
    public void onAdminCommandEvent(String name, GfSseInboundEvent event) {
        try {
            AdminCommandState acs = event.getData(AdminCommandState.class, MediaType.APPLICATION_JSON_TYPE);
            String id = acs.getId();
            if (StringUtils.ok(id)) {
                if (terse) {
                    rac.closeSse(id, ActionReport.ExitCode.SUCCESS);
                } else {
                    rac.closeSse(strings.get("detach.jobid", id), ActionReport.ExitCode.SUCCESS);
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

    }

    @Override
    public void onAdminCommandEvent(String name, GfSseInboundEvent event) {
        try {
            AdminCommandState acs = event.getData(AdminCommandState.class, "application/json");
            String id = acs.getId();
            if (StringUtils.ok(id)) {
                if (terse) {
                    rac.closeSse(id, ActionReport.ExitCode.SUCCESS);
                } else {
                    rac.closeSse(strings.get("detach.jobid", id), ActionReport.ExitCode.SUCCESS);
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

            RestLogging.restLogger.log(Level.WARNING, RestLogging.UNEXPECTED_EXCEPTION,
                    thr.toString());
            ActionReport actionReport = new PropsFileActionReporter(); //new RestActionReporter();
            actionReport.setFailureCause(thr);
            actionReport.setActionExitCode(ActionReport.ExitCode.FAILURE);
            AdminCommandState acs = new AdminCommandStateImpl(AdminCommandState.State.COMPLETED, actionReport, true, "unknown");
            onAdminCommandEvent(AdminCommandStateImpl.EVENT_STATE_CHANGED, acs);
        } finally {
            try {
                eventOuptut.close();
            } catch (IOException ex) {
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

        }
    }

    private Object process(final String name, Object event) {
        if (processor != null && AdminCommandStateImpl.EVENT_STATE_CHANGED.equals(name)) {
            AdminCommandState acs = (AdminCommandState) event;
            ActionReport report = processor.process(acs.getActionReport(), eventOuptut);
            event = new AdminCommandStateImpl(acs.getState(), report, acs.isOutboundPayloadEmpty(), acs.getId());
        }
        return event;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

            return; //Prevent events from client to be send back to client
        }

        if (AdminCommandStateImpl.EVENT_STATE_CHANGED.equals(name)) {
            unregister();
            AdminCommandState acs = (AdminCommandState) event;
            jobId = acs.getId();
            latch.countDown();
        }
    }
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

                    "Unexpected exception during command execution. {0}",
                    thr.toString()));
            ActionReport actionReport = new PropsFileActionReporter(); //new RestActionReporter();
            actionReport.setFailureCause(thr);
            actionReport.setActionExitCode(ActionReport.ExitCode.FAILURE);
            AdminCommandState acs = new AdminCommandStateImpl(AdminCommandState.State.COMPLETED, actionReport, true, "unknown");
            onAdminCommandEvent(AdminCommandStateImpl.EVENT_STATE_CHANGED, acs);
        } finally {
            try {
                eventChannel.close();
            } catch (IOException ex) {
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

        }
    }
   
    private Object process(final String name, Object event) {
        if (processor != null && AdminCommandStateImpl.EVENT_STATE_CHANGED.equals(name)) {
            AdminCommandState acs = (AdminCommandState) event;
            ActionReport report = processor.process(acs.getActionReport(), eventChannel);
            event = new AdminCommandStateImpl(acs.getState(), report, acs.isOutboundPayloadEmpty(), acs.getId());
        }
        return event;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

            RestLogging.restLogger.log(Level.WARNING, RestLogging.UNEXPECTED_EXCEPTION,
                    thr);
            ActionReport actionReport = new PropsFileActionReporter(); //new RestActionReporter();
            actionReport.setFailureCause(thr);
            actionReport.setActionExitCode(ActionReport.ExitCode.FAILURE);
            AdminCommandState acs = new AdminCommandStateImpl(AdminCommandState.State.COMPLETED, actionReport, true, "unknown");
            onAdminCommandEvent(AdminCommandStateImpl.EVENT_STATE_CHANGED, acs);
        } finally {
            try {
                eventOuptut.close();
            } catch (IOException ex) {
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

        }
    }

    private Object process(final String name, Object event) {
        if (processor != null && AdminCommandStateImpl.EVENT_STATE_CHANGED.equals(name)) {
            AdminCommandState acs = (AdminCommandState) event;
            ActionReport report = processor.process(acs.getActionReport(), eventOuptut);
            event = new AdminCommandStateImpl(acs.getState(), report, acs.isOutboundPayloadEmpty(), acs.getId());
        }
        return event;
    }
View Full Code Here

Examples of org.glassfish.api.admin.AdminCommandState

            return; //Prevent events from client to be send back to client
        }

        if (AdminCommandStateImpl.EVENT_STATE_CHANGED.equals(name)) {
            unregister();
            AdminCommandState acs = (AdminCommandState) event;
            jobId = acs.getId();
            latch.countDown();
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.