Package com.googlecode.psiprobe

Examples of com.googlecode.psiprobe.TomcatContainer


    }

    public void collect() throws Exception {
        // Job can be called before the servlet finished intialisation. Make sure
        // we dont get an NPE.
        TomcatContainer container = containerWrapper.getTomcatContainer();
        if (container != null) {
            Cluster cluster = clusterWrapper.getCluster(container.getName(), container.getHostName(), false);
            if (cluster != null) {
                buildDeltaStats("cluster.received", cluster.getTotalReceivedBytes());
                buildDeltaStats("cluster.sent", cluster.getSenderTotalBytes());
                buildDeltaStats("cluster.req.received", cluster.getNrOfMsgsReceived());
                buildDeltaStats("cluster.req.sent", cluster.getSenderNrOfRequests());
View Full Code Here


        long currentTime = System.currentTimeMillis();

        if (containerWrapper == null) {
            logger.error("Cannot collect application stats. Container wrapper is not set.");
        } else {
            TomcatContainer tomcatContainer = getContainerWrapper().getTomcatContainer();

            // check if the containerWtapper has been initialized
            if (tomcatContainer != null) {
                long totalReqDelta = 0;
                long totalAvgProcTime = 0;
                int participatingAppCount = 0;

                List contexts = tomcatContainer.findContexts();
                for (Iterator i = contexts.iterator(); i.hasNext(); ) {
                    Context ctx = (Context) i.next();

                    if (ctx != null && ctx.getName() != null) {
                        Application app = new Application();
View Full Code Here

    public void reset() {
        if (containerWrapper == null) {
            logger.error("Cannot reset application stats. Container wrapper is not set.");
        } else {
            TomcatContainer tomcatContainer = getContainerWrapper().getTomcatContainer();
            if (tomcatContainer != null) {
                List contexts = tomcatContainer.findContexts();
                for (Iterator i = contexts.iterator(); i.hasNext(); ) {
                    Context ctx = (Context) i.next();

                    if (ctx != null && ctx.getName() != null) {
                        String appName = "".equals(ctx.getName()) ? "/" : ctx.getName();
View Full Code Here

    public void setCollectionPeriod(long collectionPeriod) {
        this.collectionPeriod = collectionPeriod;
    }

    protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception {
        TomcatContainer container = getContainerWrapper().getTomcatContainer();
        Cluster cluster = getClusterWrapper().getCluster(container.getName(), container.getHostName(), isLoadMembers());
        return new ModelAndView(getViewName())
                .addObject("cluster", cluster)
                .addObject("collectionPeriod", new Long(getCollectionPeriod()));
    }
View Full Code Here

TOP

Related Classes of com.googlecode.psiprobe.TomcatContainer

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.