wt.servlet
Interface ContextMonitorMBean

All Superinterfaces:
SelfEmailingMBean

public interface ContextMonitorMBean
extends SelfEmailingMBean

Monitors a web application context

Supported API: true

Extendable: true


Field Summary
static String LOG4J_CONFIG_FILE_REF_PARAM_NAME
          Name of context init parameter from which log4j configuration file reference is obtained

Supported API: true
static String MBEAN_CONFIG_CHECK_INTERVAL_PARAM_NAME
          Name of context init parameter from which MBean configuration check interval (in seconds) is obtained

Supported API: true
static String MBEAN_CONFIG_FILE_REF_PARAM_NAME
          Name of context init parameter from which MBean configuration file reference (URL, file path, or resource path) is obtained

Supported API: true
static String ROOT_LOG4J_CONFIG_CHECK_INTERVAL_PARAM_NAME
          Name of context init parameter from which root log4j configuration check interval (in seconds) is obtained

Supported API: true
static String WEB_APP_PATH_PARAM_NAME
          Name of context init parameter from which web app path (context path) is obtained

Supported API: true
static String WEB_APP_STARTING_NOTIF
          Type of notification produced when web application context is starting

Supported API: true
static String WEB_APP_STOPPING_NOTIF
          Type of notification produced when web application context is stopping

Supported API: true
 
Method Summary
 void emailResource(String resourcePath, String addressesOrEmailList, String subject)
          E-mail the specified web app resource

Supported API: true
 void emailWebXml(String addressesOrEmailList, String subject)
          E-mail the web.xml file

Supported API: true
 String getContextAttributeAsString(String contextAttributeName)
          Returns the value of the given web app context attribute as a string, or null if no such attribute exists.
 String[] getContextAttributeNames()
          Web app context attribute names

Supported API: true
 String getContextPath()
          Path of context, if definitively known

Supported API: true
 String getDisplayName()
          Display name of web app, if specified

Supported API: true
 String getInitParameter(String initParameterName)
          Returns the value of the given initialization parameter, or null no such parameter exists.
 String[] getInitParameters()
          Web app context initialization parameters

Supported API: true
 String getRealPath()
          Real path of web app context directory on server (or null if this cannot be determined)

Supported API: true
 String getServerInfo()
          Name and version of the servlet container

Supported API: true
 String getServletSpecificationVersion()
          Version of the Java Servlet API that this servlet container supports

Supported API: true
 String getSpecifiedWebAppPath()
          Path of context specified in configuration

Supported API: true
 Timestamp getStartTime()
          Time web app context started

Supported API: true
 double getUpTimeSeconds()
          Time web app has been up since started, in seconds

Supported API: true
 String[] viewResource(String resourcePath)
          View the specified web app resource

Supported API: true
 String[] viewWebXml()
          View the web.xml file

Supported API: true
 
Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
 

Field Detail

WEB_APP_PATH_PARAM_NAME

static final String WEB_APP_PATH_PARAM_NAME
Name of context init parameter from which web app path (context path) is obtained

Supported API: true

See Also:
Constant Field Values

MBEAN_CONFIG_FILE_REF_PARAM_NAME

static final String MBEAN_CONFIG_FILE_REF_PARAM_NAME
Name of context init parameter from which MBean configuration file reference (URL, file path, or resource path) is obtained

Supported API: true

See Also:
Constant Field Values

MBEAN_CONFIG_CHECK_INTERVAL_PARAM_NAME

static final String MBEAN_CONFIG_CHECK_INTERVAL_PARAM_NAME
Name of context init parameter from which MBean configuration check interval (in seconds) is obtained

Supported API: true

See Also:
Constant Field Values

LOG4J_CONFIG_FILE_REF_PARAM_NAME

static final String LOG4J_CONFIG_FILE_REF_PARAM_NAME
Name of context init parameter from which log4j configuration file reference is obtained

Supported API: true

See Also:
Constant Field Values

ROOT_LOG4J_CONFIG_CHECK_INTERVAL_PARAM_NAME

static final String ROOT_LOG4J_CONFIG_CHECK_INTERVAL_PARAM_NAME
Name of context init parameter from which root log4j configuration check interval (in seconds) is obtained

Supported API: true

See Also:
Constant Field Values

WEB_APP_STARTING_NOTIF

static final String WEB_APP_STARTING_NOTIF
Type of notification produced when web application context is starting

Supported API: true


WEB_APP_STOPPING_NOTIF

static final String WEB_APP_STOPPING_NOTIF
Type of notification produced when web application context is stopping

Supported API: true

Method Detail

getStartTime

Timestamp getStartTime()
Time web app context started

Supported API: true


getUpTimeSeconds

double getUpTimeSeconds()
Time web app has been up since started, in seconds

Supported API: true


getRealPath

String getRealPath()
Real path of web app context directory on server (or null if this cannot be determined)

Supported API: true


getContextPath

String getContextPath()
Path of context, if definitively known

Supported API: true


getSpecifiedWebAppPath

String getSpecifiedWebAppPath()
Path of context specified in configuration

Supported API: true


getDisplayName

String getDisplayName()
Display name of web app, if specified

Supported API: true


getServletSpecificationVersion

String getServletSpecificationVersion()
Version of the Java Servlet API that this servlet container supports

Supported API: true


getServerInfo

String getServerInfo()
Name and version of the servlet container

Supported API: true


getContextAttributeNames

String[] getContextAttributeNames()
Web app context attribute names

Supported API: true


getInitParameters

String[] getInitParameters()
Web app context initialization parameters

Supported API: true


getInitParameter

String getInitParameter(String initParameterName)
Returns the value of the given initialization parameter, or null no such parameter exists.

Supported API: true

Parameters:
initParameterName - Name of the initialization parameter whose value is requested

getContextAttributeAsString

String getContextAttributeAsString(String contextAttributeName)
Returns the value of the given web app context attribute as a string, or null if no such attribute exists.

Supported API: true

Parameters:
contextAttributeName - Name of the initialization parameter whose value is requested

viewWebXml

String[] viewWebXml()
                    throws IOException
View the web.xml file

Supported API: true

Throws:
IOException

emailWebXml

void emailWebXml(String addressesOrEmailList,
                 String subject)
                 throws IOException
E-mail the web.xml file

Supported API: true

Parameters:
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
Throws:
IOException

viewResource

String[] viewResource(String resourcePath)
                      throws IOException
View the specified web app resource

Supported API: true

Parameters:
resourcePath - Path to the resource
Throws:
IOException

emailResource

void emailResource(String resourcePath,
                   String addressesOrEmailList,
                   String subject)
                   throws IOException
E-mail the specified web app resource

Supported API: true

Parameters:
resourcePath - Path to the resource
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
Throws:
IOException