Examples of StringStatisticImpl


Examples of com.sun.appserv.management.j2ee.statistics.StringStatisticImpl

     * @return an array of {@link Statistic}    
     */
    public Statistic[] getStatistics() {
        LoadBalancerStatsInterface lbstats = lbff.getLoadBalancerMonitoringStats(lbConfigName,lbName);
        Statistic[] statArr1 = new Statistic[3];
        StringStatistic stat11 = new StringStatisticImpl("Health", "Instance Health", "state of the server", 0, 0, "");
        CountStatistic stat21 = new CountStatisticImpl("NumberOfActiveRequests", "Number Of Active Requests", "count", 0, 0, 0);
        CountStatistic stat31 = new CountStatisticImpl("NumberOfTotalRequests", "Number Of Total Requests", "count", 0, 0, 0);
        statArr1[0]=stat11;
        statArr1[1]=stat21;
        statArr1[2]=stat31;
        if(lbstats == null)
            return statArr1;
        ClusterStats [] cstats = lbstats.getClusterStats();
        for(ClusterStats cstat :cstats){
            for(InstanceStats istat : cstat.getInstanceStats()){
                if(!istat.getId().equals(instanceName))
                    continue;
                    Statistic[] statArr = new Statistic[3];
                    String health = istat.getHealth();
                    long activeReq = Long.parseLong(istat.getNumActiveRequests());
                    long totalReq = Long.parseLong(istat.getNumTotalRequests());
                    long sampleTime = new Date().getTime();
                    StringStatistic stat1 = new StringStatisticImpl("Health", "Instance Health", "milliseconds", startTime, sampleTime, health);
                    CountStatistic stat2 = new CountStatisticImpl("NumberOfActiveRequests", "Number Of Active Requests", "count", startTime, sampleTime, activeReq);
                    CountStatistic stat3 = new CountStatisticImpl("NumberOfTotalRequests", "Number Of Total Requests", "count", startTime, sampleTime, totalReq);
                    statArr[0] = stat1;
                    statArr[1] = stat2;
                    statArr[2] = stat3;
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

   
    private void initializeStatistics() {

        long startTime = System.currentTimeMillis();
        id = new StringStatisticImpl("",
                                     "Id",
                                     "String",
                                     "ID of the connection queue",
                                     startTime,
                                     startTime);
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl


    private void initializeStatistics() {
       
        long startTime = System.currentTimeMillis();
        id = new StringStatisticImpl("",
                                     "id",
                                     "String",
                                     "ID of the thread pool",
                                     startTime,
                                     startTime);
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

    private void initializeStatistics(VirtualServer vs) {

        startTime = System.currentTimeMillis();

        // ID
        idStats = new StringStatisticImpl(
                                vs.getID(),
                                "Id",
                                "String",
                                "Virtual Server ID",
                                startTime,
                                startTime);

        // Mode
        modeStats = new StringStatisticImpl(
                                vs.isActive() ? "active" : "unknown",
                                "Mode",
                                "unknown/active",
                                "Virtual Server mode",
                                startTime,
                                startTime);

        // Hosts
        String hosts = null;
        String[] aliases = vs.findAliases();
        if (aliases != null) {
            for (int i=0; i<aliases.length; i++) {
                if (hosts == null) {
                    hosts = aliases[i];
                } else {
                    hosts += ", " + aliases[i];
                }
            }
        }
        hostsStats = new StringStatisticImpl(
                                hosts,
                                "Hosts",
                                "String",
                                "The software virtual hostnames serviced by "
                                + "this Virtual Server",
                                startTime,
                                startTime);

        // Interfaces
        interfacesStats = new StringStatisticImpl(
                                "0.0.0.0", // XXX FIX
                                "Interfaces",
                                "String",
                                "The interfaces for which this Virtual Server "
                                + "has been configured",
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

                lastRequestTime = listener.getLastRequestCompletionTime();
                lastMethod = listener.getLastRequestMethod();
            }
        }

        return new StringStatisticImpl(
                                lastMethod,
                                "method",
                                "String",
                                "Method of the last request serviced",
                                startTime,
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

                lastRequestTime = listener.getLastRequestCompletionTime();
                lastURI = listener.getLastRequestURI();
            }
        }

        return new StringStatisticImpl(
                                lastURI,
                                "uri",
                                "String",
                                "URI of the last request serviced",
                                startTime,
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

                    sb.append(map);
                }
            }
        }

        return new StringStatisticImpl(
                    sb != null ? sb.toString(): null,
                    "Sessions",
                    "String",
                    "List of currently active sessions",
                    initTime,
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

   
    public StringStatistic getName() {
       
        String name = bean.getName();
       
        return new StringStatisticImpl(name,
                   localStrMgr.getString("monitor.stats.name_string"),
                   localStrMgr.getString("monitor.stats.string_units"),
                   localStrMgr.getString("monitor.stats.name_of_jit_compiler"),
                   initTime,
                   System.currentTimeMillis());
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

        {
            idString = idString.concat(String.valueOf(ids[i]));
            idString = idString.concat(DELIMITER);
        }

        return new StringStatisticImpl(idString,
                   localStrMgr.getString("monitor.stats.live_threads"),
                   localStrMgr.getString("monitor.stats.string_units"),
                   localStrMgr.getString("monitor.stats.live_threads_desc"),
                   initTime,
                   System.currentTimeMillis());
View Full Code Here

Examples of com.sun.enterprise.admin.monitor.stats.StringStatisticImpl

        }
        if((ids == null) || (ids.length == 0)) {
            idString = idString.concat(
                localStrMgr.getString("monitor.stats.no_thread_deadlock"));
        }
        return new StringStatisticImpl(idString,
                   localStrMgr.getString("monitor.stats.dlocked_threads"),
                   localStrMgr.getString("monitor.stats.string_units"),
                   localStrMgr.getString("monitor.stats.dlocked_threads_desc"),
                   initTime,
                   System.currentTimeMillis());
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.