All Downloads are FREE. Search and download functionalities are using the official Maven repository.

clime.messadmin.model.IApplicationInfo Maven / Gradle / Ivy

Go to download

Notification system and Session administration for J2EE Web Applications

There is a newer version: 4.1.1
Show newest version
/**
 * 
 */
package clime.messadmin.model;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author Cédrik LIME
 */
public interface IApplicationInfo {
	/**
	 * @return Internal ID of this application. This is unique and has not human meaning.
	 */
	public String getInternalContextPath();

	/**
	 * @return number of exceptions generated during request processing
	 */
	public int getNErrors();
	/**
	 * @return last error generated during request processing, or null if none
	 */
	public ErrorData getLastError();

	/**
	 * @return number of hits for this application
	 */
	public int getHits();

	/**
	 * @return maximum of concurrent sessions for this application
	 */
	public long getMaxConcurrentSessions();

	/**
	 * @return date of maximum of concurrent sessions for this application
	 */
	public Date getMaxConcurrentSessionsDate();

	/**
	 * @return total number of created sessions for this application
	 */
	public long getTotalCreatedSessions();

	/**
	 * @return total number of network bytes received by this application
	 */
	public long getRequestTotalLength();

	/**
	 * @return maximum number of network bytes received by this application for a request
	 */
	public long getRequestMaxLength();

	/**
	 * @return date at which maximum number of network bytes received by this application for a request
	 */
	public Date getRequestMaxLengthDate();

	/**
	 * @return mean of number of network bytes received by this application for a request
	 */
	public double getRequestMeanLength();

	/**
	 * @return Std Dev of number of network bytes received by this application for a request
	 */
	public double getRequestStdDevLength();

	/**
	 * @return total number of network bytes sent by this application
	 */
	public long getResponseTotalLength();

	/**
	 * @return maximum number of network bytes sent by this application for a response
	 */
	public long getResponseMaxLength();

	/**
	 * @return date at which maximum number of network bytes sent by this application for a response
	 */
	public Date getResponseMaxLengthDate();

	/**
	 * @return mean of number of network bytes sent by this application for a response
	 */
	public double getResponseMeanLength();

	/**
	 * @return Std Dev of number of network bytes sent by this application for a response
	 */
	public double getResponseStdDevLength();

	/**
	 * @return current number of active sessions for this application
	 */
	public int getActiveSessionsCount();

	/**
	 * @return current number of passive sessions for this application
	 */
	public int getPassiveSessionsCount();

	/**
	 * @return startup time of this application
	 */
	public Date getStartupTime();

	/**
	 * @return total number of milliseconds this application has used to service requests
	 */
	public long getUsedTimeTotal();

	/**
	 * @return maximum number of milliseconds this application has used to service a request
	 */
	public long getUsedTimeMax();

	/**
	 * @return date at which maximum number of milliseconds this application has used to service a request
	 */
	public Date getUsedTimeMaxDate();

	/**
	 * @return mean of number of milliseconds this application has used to service requests
	 */
	public double getUsedTimeMean();

	/**
	 * @return SdDev of number of milliseconds this application has used to service requests
	 */
	public double getUsedTimeStdDev();

	/**
	 * @return application-specific data (user plugin)
	 */
	public List/*>*/ getApplicationSpecificData();

	// from HttpServletRequest

	/**
	 * Returns the portion of the request URI that indicates the context
	 * of the request.  The context path always comes first in a request
	 * URI.  The path starts with a "/" character but does not end with a "/"
	 * character.  For servlets in the default (root) context, this method
	 * returns "". The container does not decode this string.
	 *
	 * @return		a String specifying the
	 *			portion of the request URI that indicates the context
	 *			of the request
	 *
	 * @see javax.servlet.http.HttpServletRequest#getContextPath()
	 */
	public String getContextPath();

	// from ServletContext

	/**
	 * Returns the name and version of the servlet container on which
	 * the servlet is running. 
	 *
	 * 

The form of the returned string is * servername/versionnumber. * For example, the JavaServer Web Development Kit may return the string * JavaServer Web Dev Kit/1.0. * *

The servlet container may return other optional information * after the primary string in parentheses, for example, * JavaServer Web Dev Kit/1.0 (JDK 1.1.6; Windows NT 4.0 x86). * * @return a String containing at least the * servlet container name and version number * * @see javax.servlet.ServletContext#getServerInfo() */ public String getServerInfo(); /** * Returns the name of this web application corresponding to this ServletContext as specified in the deployment * descriptor for this web application by the display-name element. * * @return The name of the web application or null if no name has been declared in the deployment descriptor. * @since Servlet 2.3 * * @see javax.servlet.ServletContext#getServletContextName() */ public String getServletContextName(); /** * Returns a Map<String,String> containing the * context-wide initialization parameters. * *

This method can make available configuration information useful * to an entire "web application". For example, it can provide a * webmaster's email address or the name of a system that holds * critical data. * * @return a Map<String,String> containing at least the * servlet container name and version number * * @see javax.servlet.ServletContext#getInitParameterNames() * @see javax.servlet.ServletContext#getInitParameter(java.lang.String) */ public Map/**/ getInitParameters(); /** * Returns a String containing the value of the named * context-wide initialization parameter, or null if the * parameter does not exist. * *

This method can make available configuration information useful * to an entire "web application". For example, it can provide a * webmaster's email address or the name of a system that holds * critical data. * * @param name a String containing the name of the * parameter whose value is requested * * @return a String containing at least the * servlet container name and version number * * @see javax.servlet.ServletContext#getInitParameter(java.lang.String) */ public String getInitParameter(String name); /** * Returns the servlet container attributes. * An attribute allows a servlet container to give the * servlet additional information not * already provided by this interface. See your * server documentation for information about its attributes. * *

The attribute is returned as a java.lang.Object * or some subclass. * Attribute names should follow the same convention as package * names. The Java Servlet API specification reserves names * matching java.*, javax.*, * and sun.*. * * @return an Map<String,Object> containing the * attributes * * @see javax.servlet.ServletContext#getAttributeNames() * @see javax.servlet.ServletContext#getAttribute(java.lang.String) */ public Map/**/ getAttributes(); /** * Returns the servlet container attribute with the given name, * or null if there is no attribute by that name. * An attribute allows a servlet container to give the * servlet additional information not * already provided by this interface. See your * server documentation for information about its attributes. * A list of supported attributes can be retrieved using * getAttributeNames. * *

The attribute is returned as a java.lang.Object * or some subclass. * Attribute names should follow the same convention as package * names. The Java Servlet API specification reserves names * matching java.*, javax.*, * and sun.*. * * * @param name a String specifying the name * of the attribute * * @return an Object containing the value * of the attribute, or null * if no attribute exists matching the given * name * * @see javax.servlet.ServletContext#getAttribute(java.lang.String) * */ public Object getAttribute(String name); /** * Binds an object to a given attribute name in this servlet context. If * the name specified is already used for an attribute, this * method will replace the attribute with the new to the new attribute. *

If listeners are configured on the ServletContext the * container notifies them accordingly. *

* If a null value is passed, the effect is the same as calling * removeAttribute(). * *

Attribute names should follow the same convention as package * names. The Java Servlet API specification reserves names * matching java.*, javax.*, and * sun.*. * * * @param name a String specifying the name * of the attribute * * @param object an Object representing the * attribute to be bound * * @see javax.servlet.ServletContext#setAttribute(java.lang.String, java.lang.Object) */ public void setAttribute(String name, Object object); /** * Removes the attribute with the given name from * the servlet context. After removal, subsequent calls to * {@link #getAttribute} to retrieve the attribute's value * will return null. *

If listeners are configured on the ServletContext the * container notifies them accordingly. * * @param name a String specifying the name * of the attribute to be removed * * @see javax.servlet.ServletContext#removeAttribute(java.lang.String) */ public void removeAttribute(String name); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy