org.apache.catalina.mbeans

## Class MBeanFactory

- java.lang.Object
- - org.apache.catalina.mbeans.MBeanFactory

-     public class MBeanFactory
      extends Object

  A ModelMBean implementation for the `org.apache.catalina.core.StandardServer` component.

  Author:
    Amy Roh

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `MBeanFactory()` Construct a `ModelMBean` with default `ModelMBeanInfo` information.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `createAccessLoggerValve(String parent)` Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
    `String` | `createAjpConnector(String parent, String address, int port)` Create a new AjpConnector
    `String` | `createDataSourceRealm(String parent, String dataSourceName, String roleNameCol, String userCredCol, String userNameCol, String userRoleTable, String userTable)` Create a new DataSource Realm.
    `String` | `createHttpConnector(String parent, String address, int port)` Create a new HttpConnector
    `String` | `createHttpsConnector(String parent, String address, int port)` Create a new HttpsConnector
    `String` | `createJDBCRealm(String parent, String driverName, String connectionName, String connectionPassword, String connectionURL)` Create a new JDBC Realm.
    `String` | `createJNDIRealm(String parent)` Create a new JNDI Realm.
    `String` | `createMemoryRealm(String parent)` Create a new Memory Realm.
    `String` | `createRemoteAddrValve(String parent)` Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
    `String` | `createRemoteHostValve(String parent)` Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
    `String` | `createSingleSignOn(String parent)` Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
    `String` | `createStandardContext(String parent, String path, String docBase)` Create a new StandardContext.
    `String` | `createStandardContext(String parent, String path, String docBase, boolean xmlValidation, boolean xmlNamespaceAware, boolean tldValidation, boolean tldNamespaceAware)` Create a new StandardContext.
    `String` | `createStandardHost(String parent, String name, String appBase, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs)` Create a new StandardHost.
    `String` | `createStandardManager(String parent)` Create a new StandardManager.
    `String` | `createStandardServiceEngine(String domain, String defaultHost, String baseDir)` Creates a new StandardService and StandardEngine.
    `String` | `createUserDatabaseRealm(String parent, String resourceName)` Create a new UserDatabaseRealm.
    `String` | `createValve(String className, String parent)` Create a new Valve and associate it with a `Container`.
    `String` | `createWebappLoader(String parent)` Create a new Web Application Loader.
    `String` | `findObjectName(String type)` Deprecated. Unused
    `void` | `removeConnector(String name)` Remove an existing Connector.
    `void` | `removeContext(String contextName)` Remove an existing Context.
    `void` | `removeHost(String name)` Remove an existing Host.
    `void` | `removeLoader(String name)` Remove an existing Loader.
    `void` | `removeManager(String name)` Remove an existing Manager.
    `void` | `removeRealm(String name)` Remove an existing Realm.
    `void` | `removeService(String name)` Remove an existing Service.
    `void` | `removeValve(String name)` Remove an existing Valve.
    `void` | `setContainer(Object container)` Set the container that this factory was created for.

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

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

- - ### Constructor Detail

    - #### MBeanFactory

          public MBeanFactory()

      Construct a `ModelMBean` with default `ModelMBeanInfo` information.
      Throws:
        `RuntimeOperationsException` - if an IllegalArgumentException occurs

  - ### Method Detail

    - #### setContainer

          public void setContainer(Object container)

      Set the container that this factory was created for.

    - #### findObjectName

          @Deprecated
          public String findObjectName(String type)

      Deprecated. Unused
      Return the managed bean definition for the specified bean type
      Parameters:
        `type` - MBean type

    - #### createAccessLoggerValve

          @Deprecated
          public String createAccessLoggerValve(String parent)
                                         throws Exception

      Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
      Create a new AccessLoggerValve.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createAjpConnector

          public String createAjpConnector(String parent,
                                  String address,
                                  int port)
                                    throws Exception

      Create a new AjpConnector
      Parameters:
        `parent` - MBean Name of the associated parent component
        `address` - The IP address on which to bind
        `port` - TCP port number to listen on
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createDataSourceRealm

          public String createDataSourceRealm(String parent,
                                     String dataSourceName,
                                     String roleNameCol,
                                     String userCredCol,
                                     String userNameCol,
                                     String userRoleTable,
                                     String userTable)
                                       throws Exception

      Create a new DataSource Realm.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createHttpConnector

          public String createHttpConnector(String parent,
                                   String address,
                                   int port)
                                     throws Exception

      Create a new HttpConnector
      Parameters:
        `parent` - MBean Name of the associated parent component
        `address` - The IP address on which to bind
        `port` - TCP port number to listen on
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createHttpsConnector

          public String createHttpsConnector(String parent,
                                    String address,
                                    int port)
                                      throws Exception

      Create a new HttpsConnector
      Parameters:
        `parent` - MBean Name of the associated parent component
        `address` - The IP address on which to bind
        `port` - TCP port number to listen on
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createJDBCRealm

          public String createJDBCRealm(String parent,
                               String driverName,
                               String connectionName,
                               String connectionPassword,
                               String connectionURL)
                                 throws Exception

      Create a new JDBC Realm.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createJNDIRealm

          public String createJNDIRealm(String parent)
                                 throws Exception

      Create a new JNDI Realm.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createMemoryRealm

          public String createMemoryRealm(String parent)
                                   throws Exception

      Create a new Memory Realm.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createRemoteAddrValve

          @Deprecated
          public String createRemoteAddrValve(String parent)
                                       throws Exception

      Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
      Create a new Remote Address Filter Valve.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createRemoteHostValve

          @Deprecated
          public String createRemoteHostValve(String parent)
                                       throws Exception

      Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
      Create a new Remote Host Filter Valve.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createSingleSignOn

          @Deprecated
          public String createSingleSignOn(String parent)
                                    throws Exception

      Deprecated. Will be removed in Tomcat 8.0.x. Replaced by `createValve(String, String)`.
      Create a new Single Sign On Valve.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createStandardContext

          public String createStandardContext(String parent,
                                     String path,
                                     String docBase)
                                       throws Exception

      Create a new StandardContext.
      Parameters:
        `parent` - MBean Name of the associated parent component
        `path` - The context path for this Context
        `docBase` - Document base directory (or WAR) for this Context
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createStandardContext

          public String createStandardContext(String parent,
                                     String path,
                                     String docBase,
                                     boolean xmlValidation,
                                     boolean xmlNamespaceAware,
                                     boolean tldValidation,
                                     boolean tldNamespaceAware)
                                       throws Exception

      Create a new StandardContext.
      Parameters:
        `parent` - MBean Name of the associated parent component
        `path` - The context path for this Context
        `docBase` - Document base directory (or WAR) for this Context
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createStandardHost

          public String createStandardHost(String parent,
                                  String name,
                                  String appBase,
                                  boolean autoDeploy,
                                  boolean deployOnStartup,
                                  boolean deployXML,
                                  boolean unpackWARs)
                                    throws Exception

      Create a new StandardHost.
      Parameters:
        `parent` - MBean Name of the associated parent component
        `name` - Unique name of this Host
        `appBase` - Application base directory name
        `autoDeploy` - Should we auto deploy?
        `deployOnStartup` - Deploy on server startup?
        `deployXML` - Should we deploy Context XML config files property?
        `unpackWARs` - Should we unpack WARs when auto deploying?
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createStandardServiceEngine

          public String createStandardServiceEngine(String domain,
                                           String defaultHost,
                                           String baseDir)
                                             throws Exception

      Creates a new StandardService and StandardEngine.
      Parameters:
        `domain` - Domain name for the container instance
        `defaultHost` - Name of the default host to be used in the Engine
        `baseDir` - Base directory value for Engine
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createStandardManager

          public String createStandardManager(String parent)
                                       throws Exception

      Create a new StandardManager.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createUserDatabaseRealm

          public String createUserDatabaseRealm(String parent,
                                       String resourceName)
                                         throws Exception

      Create a new UserDatabaseRealm.
      Parameters:
        `parent` - MBean Name of the associated parent component
        `resourceName` - Global JNDI resource name of the associated UserDatabase
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### createValve

          public String createValve(String className,
                           String parent)
                             throws Exception

      Create a new Valve and associate it with a `Container`.
      Parameters:
        `className` - The fully qualified class name of the `Valve` to create
        `parent` - The MBean name of the associated parent `Container`.
      Returns:
        The MBean name of the `Valve` that was created or `null` if the `Valve` does not implement `LifecycleMBeanBase`.
      Throws:
        `Exception`

    - #### createWebappLoader

          public String createWebappLoader(String parent)
                                    throws Exception

      Create a new Web Application Loader.
      Parameters:
        `parent` - MBean Name of the associated parent component
      Throws:
        `Exception` - if an MBean cannot be created or registered

    - #### removeConnector

          public void removeConnector(String name)
                               throws Exception

      Remove an existing Connector.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeContext

          public void removeContext(String contextName)
                             throws Exception

      Remove an existing Context.
      Parameters:
        `contextName` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeHost

          public void removeHost(String name)
                          throws Exception

      Remove an existing Host.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeLoader

          public void removeLoader(String name)
                            throws Exception

      Remove an existing Loader.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeManager

          public void removeManager(String name)
                             throws Exception

      Remove an existing Manager.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeRealm

          public void removeRealm(String name)
                           throws Exception

      Remove an existing Realm.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeService

          public void removeService(String name)
                             throws Exception

      Remove an existing Service.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

    - #### removeValve

          public void removeValve(String name)
                           throws Exception

      Remove an existing Valve.
      Parameters:
        `name` - MBean Name of the component to remove
      Throws:
        `Exception` - if a component cannot be removed

Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.