public class MBeanFactory extends Object
Constructor and Description |
---|
MBeanFactory()
Construct a
ModelMBean with default
ModelMBeanInfo information. |
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)
Deprecated.
This method will be removed in Tomcat 10. Use a
DataSourceRealm instead.
|
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.
|
public MBeanFactory()
ModelMBean
with default
ModelMBeanInfo
information.RuntimeOperationsException
- if an
IllegalArgumentException occurspublic void setContainer(Object container)
container
- The associated container@Deprecated public String findObjectName(String type)
type
- MBean type@Deprecated public String createAccessLoggerValve(String parent) throws Exception
createValve(String, String)
.parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registeredpublic String createAjpConnector(String parent, String address, int port) throws Exception
parent
- MBean Name of the associated parent componentaddress
- The IP address on which to bindport
- TCP port number to listen onException
- if an MBean cannot be created or registeredpublic String createDataSourceRealm(String parent, String dataSourceName, String roleNameCol, String userCredCol, String userNameCol, String userRoleTable, String userTable) throws Exception
parent
- MBean Name of the associated parent componentdataSourceName
- the datasource nameroleNameCol
- the column name for the role namesuserCredCol
- the column name for the user credentialsuserNameCol
- the column name for the user namesuserRoleTable
- the table name for the roles tableuserTable
- the table name for the usersException
- if an MBean cannot be created or registeredpublic String createHttpConnector(String parent, String address, int port) throws Exception
parent
- MBean Name of the associated parent componentaddress
- The IP address on which to bindport
- TCP port number to listen onException
- if an MBean cannot be created or registeredpublic String createHttpsConnector(String parent, String address, int port) throws Exception
parent
- MBean Name of the associated parent componentaddress
- The IP address on which to bindport
- TCP port number to listen onException
- if an MBean cannot be created or registered@Deprecated public String createJDBCRealm(String parent, String driverName, String connectionName, String connectionPassword, String connectionURL) throws Exception
parent
- MBean Name of the associated parent componentdriverName
- JDBC driver nameconnectionName
- the user name for the connectionconnectionPassword
- the password for the connectionconnectionURL
- the connection URL to the databaseException
- if an MBean cannot be created or registeredpublic String createJNDIRealm(String parent) throws Exception
parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registeredpublic String createMemoryRealm(String parent) throws Exception
parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registered@Deprecated public String createRemoteAddrValve(String parent) throws Exception
createValve(String, String)
.parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registered@Deprecated public String createRemoteHostValve(String parent) throws Exception
createValve(String, String)
.parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registered@Deprecated public String createSingleSignOn(String parent) throws Exception
createValve(String, String)
.parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registeredpublic String createStandardContext(String parent, String path, String docBase) throws Exception
parent
- MBean Name of the associated parent componentpath
- The context path for this ContextdocBase
- Document base directory (or WAR) for this ContextException
- if an MBean cannot be created or registeredpublic String createStandardContext(String parent, String path, String docBase, boolean xmlValidation, boolean xmlNamespaceAware, boolean tldValidation, boolean tldNamespaceAware) throws Exception
parent
- MBean Name of the associated parent componentpath
- The context path for this ContextdocBase
- Document base directory (or WAR) for this ContextxmlValidation
- if XML descriptors should be validatedxmlNamespaceAware
- if the XML processor should namespace awareException
- if an MBean cannot be created or registeredpublic String createStandardHost(String parent, String name, String appBase, boolean autoDeploy, boolean deployOnStartup, boolean deployXML, boolean unpackWARs) throws Exception
parent
- MBean Name of the associated parent componentname
- Unique name of this HostappBase
- Application base directory nameautoDeploy
- 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?Exception
- if an MBean cannot be created or registeredpublic String createStandardServiceEngine(String domain, String defaultHost, String baseDir) throws Exception
domain
- Domain name for the container instancedefaultHost
- Name of the default host to be used in the EnginebaseDir
- Base directory value for EngineException
- if an MBean cannot be created or registeredpublic String createStandardManager(String parent) throws Exception
parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registeredpublic String createUserDatabaseRealm(String parent, String resourceName) throws Exception
parent
- MBean Name of the associated parent componentresourceName
- Global JNDI resource name of the associated
UserDatabaseException
- if an MBean cannot be created or registeredpublic String createValve(String className, String parent) throws Exception
Container
.className
- The fully qualified class name of the Valve
to
createparent
- The MBean name of the associated parent
Container
.Valve
that was created or
null
if the Valve
does not implement
JmxEnabled
.Exception
- if an MBean cannot be created or registeredpublic String createWebappLoader(String parent) throws Exception
parent
- MBean Name of the associated parent componentException
- if an MBean cannot be created or registeredpublic void removeConnector(String name) throws Exception
name
- MBean Name of the component to removeException
- if a component cannot be removedpublic void removeContext(String contextName) throws Exception
contextName
- MBean Name of the component to removeException
- if a component cannot be removedpublic void removeHost(String name) throws Exception
name
- MBean Name of the component to removeException
- if a component cannot be removedpublic void removeLoader(String name) throws Exception
name
- MBean Name of the component to removeException
- if a component cannot be removedpublic void removeManager(String name) throws Exception
name
- MBean Name of the component to removeException
- if a component cannot be removedpublic void removeRealm(String name) throws Exception
name
- MBean Name of the component to removeException
- if a component cannot be removedpublic void removeService(String name) throws Exception
name
- MBean Name of the component to removeException
- if a component cannot be removedCopyright © 2000-2021 Apache Software Foundation. All Rights Reserved.