001: /*
002: * Copyright (c) 1998-2008 Caucho Technology -- all rights reserved
003: *
004: * This file is part of Resin(R) Open Source
005: *
006: * Each copy or derived work must preserve the copyright notice and this
007: * notice unmodified.
008: *
009: * Resin Open Source is free software; you can redistribute it and/or modify
010: * it under the terms of the GNU General Public License as published by
011: * the Free Software Foundation; either version 2 of the License, or
012: * (at your option) any later version.
013: *
014: * Resin Open Source is distributed in the hope that it will be useful,
015: * but WITHOUT ANY WARRANTY; without even the implied warranty of
016: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, or any warranty
017: * of NON-INFRINGEMENT. See the GNU General Public License for more
018: * details.
019: *
020: * You should have received a copy of the GNU General Public License
021: * along with Resin Open Source; if not, write to the
022: *
023: * Free Software Foundation, Inc.
024: * 59 Temple Place, Suite 330
025: * Boston, MA 02111-1307 USA
026: *
027: * @author Scott Ferguson
028: */
029:
030: package com.caucho.management.server;
031:
032: import java.util.Date;
033:
034: import com.caucho.jmx.Description;
035: import com.caucho.jmx.Units;
036:
037: /**
038: * MBean API for the WebApp.
039: *
040: * <pre>
041: * resin:type=WebAppMBean,name=/wiki,Host=foo.com
042: * </pre>
043: */
044: @Description("The web-app management interface")
045: public interface WebAppMXBean extends DeployControllerMXBean {
046: //
047: // Hierarchy attributes
048: //
049:
050: /**
051: * Returns the owning host
052: */
053: @Description("The web-app's host")
054: public HostMXBean getHost();
055:
056: /**
057: * Returns the session manager
058: */
059: @Description("The web-app's session manager")
060: public SessionManagerMXBean getSessionManager();
061:
062: //
063: // Configuration attributes
064: //
065:
066: /**
067: * Returns the root directory.
068: */
069: @Description("The configured filesystem directory for the web-app")
070: public String getRootDirectory();
071:
072: /**
073: * Returns the application's context path.
074: */
075: @Description("The configured context path that identifies the web-app in a url")
076: public String getContextPath();
077:
078: //
079: // Status attributes
080: //
081:
082: /**
083: * Returns the number of 500 status requests
084: */
085: @Description("The total number of 500 status errors")
086: public long getStatus500CountTotal();
087:
088: /**
089: * Returns the time of the last 500 status requests
090: */
091: @Description("The time of the last 500 status error")
092: public Date getStatus500LastTime();
093:
094: //
095: // Statistics attributes
096: //
097:
098: /**
099: * Returns the current number of requests being serviced by the web-app.
100: */
101: @Description("The current number of requests served by the web-app")
102: public int getRequestCount();
103:
104: /**
105: * Returns the total number of requests serviced by the web-app
106: * since it started.
107: */
108: @Description("The total number of requests served by the web-app since starting")
109: public long getRequestCountTotal();
110:
111: /**
112: * Returns the total duration in milliseconds that connections serviced by
113: * this web-app have taken.
114: */
115: @Description("The total real (wall-clock) time in milliseconds taken by requests served by the web-app")
116: @Units("milliseconds")
117: public long getRequestTimeTotal();
118:
119: /**
120: * Returns the total number of bytes that requests serviced by
121: * this web-app have read.
122: */
123: @Description("The total number of bytes received in client requests")
124: @Units("bytes")
125: public long getRequestReadBytesTotal();
126:
127: /**
128: * Returns the total number of bytes that connections serviced by this
129: * web-app have written.
130: */
131: @Description("The total number of bytes sent to clients")
132: @Units("bytes")
133: public long getRequestWriteBytesTotal();
134:
135: /**
136: * Returns the number of connections that have ended with a
137: * {@link com.caucho.vfs.ClientDisconnectException} for this web-app in it's lifetime.
138: */
139: @Description("The total number of times a client has disconnected before a request completed")
140: public long getClientDisconnectCountTotal();
141: }
|