ContextMBean (Apache Tomcat 10.1.16 API Documentation)
Description: declaration: package: org.apache.catalina.mbeans, class: ContextMBean

Package org.apache.catalina.mbeans

# Class ContextMBean

java.lang.Object
org.apache.tomcat.util.modeler.BaseModelMBean
org.apache.catalina.mbeans.BaseCatalinaMBean<Context>
org.apache.catalina.mbeans.ContextMBean

All Implemented Interfaces:
  `DynamicMBean`, `MBeanRegistration`, `ModelMBeanNotificationBroadcaster`, `NotificationBroadcaster`

public class ContextMBean extends BaseCatalinaMBean<Context>

- ## Field Summary

  ### Fields inherited from class org.apache.tomcat.util.modeler.BaseModelMBean

  `attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ContextMBean()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String[]`
  `findApplicationParameters()`
  Return the set of application parameters for this application.
  `String[]`
  `findConstraints()`
  Return the security constraints for this web application.
  `String`
  `findErrorPage(int errorCode)`
  Return the error page entry for the specified HTTP error code, if any; otherwise return `null`.
  `String`
  `findErrorPage(Throwable exceptionType)`
  Return the error page entry for the specified Java exception type, if any; otherwise return `null`.
  `String[]`
  `findErrorPages()`
  Return the set of defined error pages for all specified error codes and exception types.
  `String`
  `findFilterDef(String name)`
  Return the filter definition for the specified filter name, if any; otherwise return `null`.
  `String[]`
  `findFilterDefs()`
  Return the set of defined filters for this Context.
  `String[]`
  `findFilterMaps()`
  Return the set of filter mappings for this Context.

  ### Methods inherited from class org.apache.catalina.mbeans.BaseCatalinaMBean

  `doGetManagedResource, newInstance`

  ### Methods inherited from class org.apache.tomcat.util.modeler.BaseModelMBean

  `addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, invoke, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedBean, setManagedResource, toString`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Constructor Details

  - ### ContextMBean

    public ContextMBean()

- ## Method Details

  - ### findApplicationParameters

    public String[] findApplicationParameters() throws MBeanException
    Return the set of application parameters for this application.
    Returns:
      a string array with a representation of each parameter
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findConstraints

    public String[] findConstraints() throws MBeanException
    Return the security constraints for this web application. If there are none, a zero-length array is returned.
    Returns:
      a string array with a representation of each security constraint
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findErrorPage

    public String findErrorPage(int errorCode) throws MBeanException
    Return the error page entry for the specified HTTP error code, if any; otherwise return `null`.
    Parameters:
      `errorCode` - Error code to look up
    Returns:
      a string representation of the error page
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findErrorPage

    public String findErrorPage(Throwable exceptionType) throws MBeanException
    Return the error page entry for the specified Java exception type, if any; otherwise return `null`.
    Parameters:
      `exceptionType` - Exception type to look up
    Returns:
      a string representation of the error page
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findErrorPages

    public String[] findErrorPages() throws MBeanException
    Return the set of defined error pages for all specified error codes and exception types.
    Returns:
      a string array with a representation of each error page
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findFilterDef

    public String findFilterDef(String name) throws MBeanException
    Return the filter definition for the specified filter name, if any; otherwise return `null`.
    Parameters:
      `name` - Filter name to look up
    Returns:
      a string representation of the filter definition
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findFilterDefs

    public String[] findFilterDefs() throws MBeanException
    Return the set of defined filters for this Context.
    Returns:
      a string array with a representation of all the filter definitions
    Throws:
      `MBeanException` - propagated from the managed resource access

  - ### findFilterMaps

    public String[] findFilterMaps() throws MBeanException
    Return the set of filter mappings for this Context.
    Returns:
      a string array with a representation of all the filter mappings
    Throws:
      `MBeanException` - propagated from the managed resource access