Package javax.management.j2ee.statistics

Examples of javax.management.j2ee.statistics.CountStatistic


  StringBuffer sbuf = new StringBuffer();
  Statistic[] stats = getStatistics();
  int sz = stats.length;
  for (int i=0; i<sz; i++) {
      if (stats[i] instanceof CountStatistic) {
    CountStatistic stat = (CountStatistic) stats[i];
    sbuf.append(stat.getName()).append("=")
        .append(stat.getCount()).append("; ");
      } else if (stats[iinstanceof BoundedRangeStatistic) {
    BoundedRangeStatistic stat = (BoundedRangeStatistic) stats[i];
    sbuf.append(stat.getName()).append("=")
        .append(stat.getCurrent()).append("; ");
      } else {
    sbuf.append(stats[i].getName()).append("=?");
      }
  }
View Full Code Here


    public void setStatsProvider(Layer provider) {
        this.dialogManager = (DialogManager)provider;
    }

    private void initializeStatistics() {
        CountStatistic c;
        c = new CountStatisticImpl("FailedSipDialogs");
        failedSipDialogs = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("ConcurrentSipDialogs");
        concurrentSipDialogs = new MutableCountStatisticImpl(c);
View Full Code Here

        this.networkManager = (NetworkManager)provider;
    }

   private void initializeStatistics() {

        CountStatistic c;
        c = new CountStatisticImpl("INVITEReceivedSipRequests");
        inviteReceivedSipRequests = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("PUBLISHReceivedSipRequests");
        publishReceivedSipRequests = new MutableCountStatisticImpl(c);
View Full Code Here

    public void setStatsProvider(Layer provider) {
        this.networkManager = (NetworkManager)provider;
    }

    private void initializeStatistics() {
        CountStatistic c;
        c = new CountStatisticImpl("InvalidSipMessages");
        invalidSipMessages = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("ReceivedSipRequests");
        receivedSipRequests = new MutableCountStatisticImpl(c);
View Full Code Here

    public void setStatsProvider(Layer provider) {
        this.transactionManager = (TransactionManager)provider;
    }

    private void initializeStatistics() {
        CountStatistic c;
        c = new CountStatisticImpl("sipClientTransactions");
        sipClientTransactions = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("sipServerTransactions");
        sipServerTransactions = new MutableCountStatisticImpl(c);
View Full Code Here

    public void setStatsProvider(Layer provider){
        this.overloadProtectionManager = (OverloadProtectionManager)provider;
    }

    private void initializeStatistics() {
        CountStatistic c;
        c = new CountStatisticImpl("OverloadRejectedHttpRequests");
        overloadRejectedHttpRequests = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("OverloadRejectedSipRequests");
        overloadRejectedSipRequests = new MutableCountStatisticImpl(c);
View Full Code Here

     */
    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;
                    return statArr;
            }
View Full Code Here

    public void setStatsProvider(Layer provider) {
        this.networkManager = (NetworkManager)provider;
    }
    private void initializeStatistics() {

        CountStatistic c;
        c = new CountStatisticImpl("1xxReceivedSipResponses");
        _1xxReceivedSipResponses = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("2xxReceivedSipResponses");
        _2xxReceivedSipResponses = new MutableCountStatisticImpl(c);
View Full Code Here

    public void setStatsProvider(Layer provider) {
        this.networkManager = (NetworkManager)provider;
    }
    private void initializeStatistics() {

        CountStatistic c;
        c = new CountStatisticImpl("1xxReceivedSipResponses");
        _1xxReceivedSipResponses = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("2xxReceivedSipResponses");
        _2xxReceivedSipResponses = new MutableCountStatisticImpl(c);
View Full Code Here

        this.networkManager = (NetworkManager)provider;
    }

    private void initializeStatistics() {

        CountStatistic c;
        c = new CountStatisticImpl("INVITESentSipRequests");
        inviteSentSipRequests = new MutableCountStatisticImpl(c);

        c = new CountStatisticImpl("PUBLISHSentSipRequests");
        publishSentSipRequests = new MutableCountStatisticImpl(c);
View Full Code Here

TOP

Related Classes of javax.management.j2ee.statistics.CountStatistic

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.