Examples of SystemStatisticsUtil


Examples of org.wso2.carbon.statistics.services.SystemStatisticsUtil

            //Register Statistics MBean
            registerMBeans(serverConfig);
            //Registering StatisticsAdmin as an OSGi service.
            BundleContext bundleCtx = ctxt.getBundleContext();
            statAdminServiceRegistration = bundleCtx.registerService(SystemStatisticsUtil.class.getName(),
                    new SystemStatisticsUtil(), null);
            axisConfigCtxObserverServiceRegistration =
                    bundleCtx.registerService(Axis2ConfigurationContextObserver.class.getName(),
                            new StatisticsAxis2ConfigurationContextObserver(), null);
            log.debug("Statistics bundle is activated");
        } catch (Throwable e) {
View Full Code Here

Examples of org.wso2.carbon.statistics.services.SystemStatisticsUtil

            // Handle service response time
            AxisService axisService = messageContext.getAxisService();
            if (axisService != null) {
                Parameter parameter =
                    axisService.getParameter(StatisticsConstants.SERVICE_RESPONSE_TIME_PROCESSOR);
                int serviceRequestCount = new SystemStatisticsUtil().getServiceRequestCount(axisService);
                ((ResponseTimeProcessor) parameter.getValue()).addResponseTime(responseTime,
                                                                               serviceRequestCount);
            }
        }
    }
View Full Code Here

Examples of org.wso2.carbon.statistics.services.SystemStatisticsUtil

    private SystemStatisticsUtil statService;

    public SystemStatistics() throws AxisFault {
        try {
            statService = new SystemStatisticsUtil();
            javaVersion = System.getProperty("java.version");
        } catch (Exception e) {
            throw AxisFault.makeFault(e);
        }
    }
View Full Code Here

Examples of org.wso2.carbon.statistics.services.SystemStatisticsUtil

    public InvocationResponse invoke(MessageContext msgContext) throws AxisFault {

        try {

            CountData countData = StatisticsServiceComponent.getCountData();
            SystemStatisticsUtil systemStatisticsUtil = StatisticsServiceComponent.getSystemStatisticsUtil();
            EventingConfigData eventingConfigData = StatisticsServiceComponent.getServiceStatisticsPublisherAdmin()
                    .getEventingConfigData();

            if (eventingConfigData != null && eventingConfigData.eventingEnabled()
                    && eventingConfigData.getSystemRequestCountThreshold() > 0) {
                SystemStatistics systemStatistics = systemStatisticsUtil.getSystemStatistics(msgContext
                        .getConfigurationContext().getAxisConfiguration());

                if (msgContext.getAxisOperation() != null) {
                    OperationStatistics operationStatistics = systemStatisticsUtil.getOperationStatistics(
                            msgContext.getAxisOperation());
                    if (operationStatistics.getRequestCount() == 0) {
                        return InvocationResponse.CONTINUE;
                    }
                }//In very rare cases msgContext.getAxisOperation() becomes null, then we can't get statistics.
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.