Package org.apache.catalina.mbeans
Class MBeanFactory
- java.lang.Object
- 
- org.apache.catalina.mbeans.MBeanFactory
 
- 
 public class MBeanFactory extends java.lang.Object- Author:
- Amy Roh
 
- 
- 
Field SummaryFields Modifier and Type Field Description protected static StringManagersm
 - 
Constructor SummaryConstructors Constructor Description MBeanFactory()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.StringcreateAjpConnector(java.lang.String parent, java.lang.String address, int port)Create a new AjpConnectorjava.lang.StringcreateDataSourceRealm(java.lang.String parent, java.lang.String dataSourceName, java.lang.String roleNameCol, java.lang.String userCredCol, java.lang.String userNameCol, java.lang.String userRoleTable, java.lang.String userTable)Create a new DataSource Realm.java.lang.StringcreateHttpConnector(java.lang.String parent, java.lang.String address, int port)Create a new HttpConnectorjava.lang.StringcreateHttpsConnector(java.lang.String parent, java.lang.String address, int port)Create a new HttpsConnectorjava.lang.StringcreateJDBCRealm(java.lang.String parent, java.lang.String driverName, java.lang.String connectionName, java.lang.String connectionPassword, java.lang.String connectionURL)Deprecated.This method will be removed in Tomcat 10.java.lang.StringcreateJNDIRealm(java.lang.String parent)Create a new JNDI Realm.java.lang.StringcreateMemoryRealm(java.lang.String parent)Create a new Memory Realm.java.lang.StringcreateStandardContext(java.lang.String parent, java.lang.String path, java.lang.String docBase)Create a new StandardContext.java.lang.StringcreateStandardContext(java.lang.String parent, java.lang.String path, java.lang.String docBase, boolean xmlValidation, boolean xmlNamespaceAware)Create a new StandardContext.java.lang.StringcreateStandardHost(java.lang.String parent, java.lang.String name, java.lang.String appBase, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs)Create a new StandardHost.java.lang.StringcreateStandardManager(java.lang.String parent)Create a new StandardManager.java.lang.StringcreateStandardServiceEngine(java.lang.String domain, java.lang.String defaultHost, java.lang.String baseDir)Creates a new StandardService and StandardEngine.java.lang.StringcreateUserDatabaseRealm(java.lang.String parent, java.lang.String resourceName)Create a new UserDatabaseRealm.java.lang.StringcreateValve(java.lang.String className, java.lang.String parent)Create a new Valve and associate it with aContainer.java.lang.StringcreateWebappLoader(java.lang.String parent)Create a new Web Application Loader.voidremoveConnector(java.lang.String name)Remove an existing Connector.voidremoveContext(java.lang.String contextName)Remove an existing Context.voidremoveHost(java.lang.String name)Remove an existing Host.voidremoveLoader(java.lang.String name)Remove an existing Loader.voidremoveManager(java.lang.String name)Remove an existing Manager.voidremoveRealm(java.lang.String name)Remove an existing Realm.voidremoveService(java.lang.String name)Remove an existing Service.voidremoveValve(java.lang.String name)Remove an existing Valve.voidsetContainer(java.lang.Object container)Set the container that this factory was created for.
 
- 
- 
- 
Field Detail- 
smprotected static final StringManager sm 
 
- 
 - 
Method Detail- 
setContainerpublic void setContainer(java.lang.Object container) Set the container that this factory was created for.- Parameters:
- container- The associated container
 
 - 
createAjpConnectorpublic java.lang.String createAjpConnector(java.lang.String parent, java.lang.String address, int port) throws java.lang.ExceptionCreate 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
- Returns:
- the object name of the created connector
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createDataSourceRealmpublic java.lang.String createDataSourceRealm(java.lang.String parent, java.lang.String dataSourceName, java.lang.String roleNameCol, java.lang.String userCredCol, java.lang.String userNameCol, java.lang.String userRoleTable, java.lang.String userTable) throws java.lang.ExceptionCreate a new DataSource Realm.- Parameters:
- parent- MBean Name of the associated parent component
- dataSourceName- the datasource name
- roleNameCol- the column name for the role names
- userCredCol- the column name for the user credentials
- userNameCol- the column name for the user names
- userRoleTable- the table name for the roles table
- userTable- the table name for the users
- Returns:
- the object name of the created realm
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createHttpConnectorpublic java.lang.String createHttpConnector(java.lang.String parent, java.lang.String address, int port) throws java.lang.ExceptionCreate 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
- Returns:
- the object name of the created connector
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createHttpsConnectorpublic java.lang.String createHttpsConnector(java.lang.String parent, java.lang.String address, int port) throws java.lang.ExceptionCreate 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
- Returns:
- the object name of the created connector
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createJDBCRealm@Deprecated public java.lang.String createJDBCRealm(java.lang.String parent, java.lang.String driverName, java.lang.String connectionName, java.lang.String connectionPassword, java.lang.String connectionURL) throws java.lang.ExceptionDeprecated.This method will be removed in Tomcat 10. Use a DataSourceRealm instead.Create a new JDBC Realm.- Parameters:
- parent- MBean Name of the associated parent component
- driverName- JDBC driver name
- connectionName- the user name for the connection
- connectionPassword- the password for the connection
- connectionURL- the connection URL to the database
- Returns:
- the object name of the created realm
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createJNDIRealmpublic java.lang.String createJNDIRealm(java.lang.String parent) throws java.lang.ExceptionCreate a new JNDI Realm.- Parameters:
- parent- MBean Name of the associated parent component
- Returns:
- the object name of the created realm
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createMemoryRealmpublic java.lang.String createMemoryRealm(java.lang.String parent) throws java.lang.ExceptionCreate a new Memory Realm.- Parameters:
- parent- MBean Name of the associated parent component
- Returns:
- the object name of the created realm
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createStandardContextpublic java.lang.String createStandardContext(java.lang.String parent, java.lang.String path, java.lang.String docBase) throws java.lang.ExceptionCreate 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
- Returns:
- the object name of the created context
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createStandardContextpublic java.lang.String createStandardContext(java.lang.String parent, java.lang.String path, java.lang.String docBase, boolean xmlValidation, boolean xmlNamespaceAware) throws java.lang.ExceptionCreate 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
- xmlValidation- if XML descriptors should be validated
- xmlNamespaceAware- if the XML processor should namespace aware
- Returns:
- the object name of the created context
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createStandardHostpublic java.lang.String createStandardHost(java.lang.String parent, java.lang.String name, java.lang.String appBase, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs) throws java.lang.ExceptionCreate 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?
- Returns:
- the object name of the created host
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createStandardServiceEnginepublic java.lang.String createStandardServiceEngine(java.lang.String domain, java.lang.String defaultHost, java.lang.String baseDir) throws java.lang.ExceptionCreates 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
- Returns:
- the object name of the created service
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createStandardManagerpublic java.lang.String createStandardManager(java.lang.String parent) throws java.lang.ExceptionCreate a new StandardManager.- Parameters:
- parent- MBean Name of the associated parent component
- Returns:
- the object name of the created manager
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createUserDatabaseRealmpublic java.lang.String createUserDatabaseRealm(java.lang.String parent, java.lang.String resourceName) throws java.lang.ExceptionCreate a new UserDatabaseRealm.- Parameters:
- parent- MBean Name of the associated parent component
- resourceName- Global JNDI resource name of the associated UserDatabase
- Returns:
- the object name of the created realm
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createValvepublic java.lang.String createValve(java.lang.String className, java.lang.String parent) throws java.lang.ExceptionCreate a new Valve and associate it with aContainer.- Parameters:
- className- The fully qualified class name of the- Valveto create
- parent- The MBean name of the associated parent- Container.
- Returns:
- The MBean name of the Valvethat was created ornullif theValvedoes not implementJmxEnabled.
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
createWebappLoaderpublic java.lang.String createWebappLoader(java.lang.String parent) throws java.lang.ExceptionCreate a new Web Application Loader.- Parameters:
- parent- MBean Name of the associated parent component
- Returns:
- the object name of the created loader
- Throws:
- java.lang.Exception- if an MBean cannot be created or registered
 
 - 
removeConnectorpublic void removeConnector(java.lang.String name) throws java.lang.ExceptionRemove an existing Connector.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeContextpublic void removeContext(java.lang.String contextName) throws java.lang.ExceptionRemove an existing Context.- Parameters:
- contextName- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeHostpublic void removeHost(java.lang.String name) throws java.lang.ExceptionRemove an existing Host.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeLoaderpublic void removeLoader(java.lang.String name) throws java.lang.ExceptionRemove an existing Loader.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeManagerpublic void removeManager(java.lang.String name) throws java.lang.ExceptionRemove an existing Manager.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeRealmpublic void removeRealm(java.lang.String name) throws java.lang.ExceptionRemove an existing Realm.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeServicepublic void removeService(java.lang.String name) throws java.lang.ExceptionRemove an existing Service.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 - 
removeValvepublic void removeValve(java.lang.String name) throws java.lang.ExceptionRemove an existing Valve.- Parameters:
- name- MBean Name of the component to remove
- Throws:
- java.lang.Exception- if a component cannot be removed
 
 
- 
 
-