Package com.sun.enterprise.universal

Examples of com.sun.enterprise.universal.Duration


    public Object[] getUptimeMillis() {
        final ServerEnvironmentImpl env = InjectedValues.getInstance().getServerEnvironment();

        final long elapsed = System.currentTimeMillis() - env.getStartupContext().getCreationTime();
        final Duration duration = new Duration(elapsed);

        return new Object[]{
                    elapsed, duration.toString()
                };
    }
View Full Code Here


    public Object[] getUptimeMillis() {
        final ServerEnvironmentImpl env = InjectedValues.getInstance().getServerEnvironment();

        final long elapsed = System.currentTimeMillis() - env.getStartupContext().getCreationTime();
        final Duration duration = new Duration(elapsed);

        return new Object[]{
                    elapsed, duration.toString()
                };
    }
View Full Code Here

            return null;
        }
    }

    private String formatTime(long uptime) {
        return Strings.get("instanceinfo.uptime", new Duration(uptime));
    }
View Full Code Here

    public Object[] getUptimeMillis() {
        final ServerEnvironmentImpl env = InjectedValues.getInstance().getServerEnvironment();

        final long elapsed = System.currentTimeMillis() - env.getStartupContext().getCreationTime();
        final Duration duration = new Duration(elapsed);

        return new Object[]{
                    elapsed, duration.toString()
                };
    }
View Full Code Here

    Boolean milliseconds;

    public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();
        long totalTime_ms = getUptime();
        Duration duration = new Duration(totalTime_ms);
        duration.setTerse();
        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
        String message;

        if (milliseconds)
            message = "" + totalTime_ms;
View Full Code Here

            return null;
        }
    }

    private String formatTime(long uptime) {
        return Strings.get("instanceinfo.uptime", new Duration(uptime));
    }
View Full Code Here

            return null;
        }
    }

    private String formatTime(long uptime) {
        return Strings.get("instanceinfo.uptime", new Duration(uptime));
    }
View Full Code Here

    public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();
        long totalTime_ms = getUptime();
        String totalTime_mss = "" + totalTime_ms; 
        Duration duration = new Duration(totalTime_ms);
        duration.setTerse();
        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
        String message;

        if (milliseconds)
            message = totalTime_mss;
View Full Code Here

    public void execute(AdminCommandContext context) {
        final ActionReport report = context.getActionReport();
        long totalTime_ms = getUptime();
        String totalTime_mss = "" + totalTime_ms;
        Duration duration = new Duration(totalTime_ms);
        duration.setTerse();
        report.setActionExitCode(ActionReport.ExitCode.SUCCESS);
        String message;

        if (milliseconds)
            message = totalTime_mss;
View Full Code Here

    public Object[] getUptimeMillis() {
        final ServerEnvironmentImpl env = InjectedValues.getInstance().getServerEnvironment();

        final long elapsed = System.currentTimeMillis() - env.getStartupContext().getCreationTime();
        final Duration duration = new Duration(elapsed);

        return new Object[]{
                    elapsed, duration.toString()
                };
    }
View Full Code Here

TOP

Related Classes of com.sun.enterprise.universal.Duration

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.