public class UserMBean extends BaseModelMBean
A ModelMBean implementation for the
 org.apache.catalina.User component.
| Modifier and Type | Field and Description | 
|---|---|
| protected ManagedBean | managedThe  ManagedBeaninformation describing this MBean. | 
| protected Registry | registryThe configuration information registry for our managed beans. | 
attributeBroadcaster, generalBroadcaster, managedBean, oname, resource, resourceType| Constructor and Description | 
|---|
| UserMBean()Construct a  ModelMBeanwith defaultModelMBeanInfoinformation. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addGroup(String groupname)Add a new  Groupto those this user belongs to. | 
| void | addRole(String rolename)Add a new  Roleto those this user belongs to. | 
| String[] | getGroups()Return the MBean Names of all groups this user is a member of. | 
| String[] | getRoles()Return the MBean Names of all roles assigned to this user. | 
| void | removeGroup(String groupname)Remove a  Groupfrom those this user belongs to. | 
| void | removeRole(String rolename)Remove a  Rolefrom those this user belongs to. | 
addAttributeChangeNotificationListener, addNotificationListener, getAttribute, getAttributes, getClassName, getJmxName, getManagedResource, getMBeanInfo, getModelerType, getNotificationInfo, getObjectName, invoke, postDeregister, postRegister, preDeregister, preRegister, removeAttributeChangeNotificationListener, removeAttributeChangeNotificationListener, removeNotificationListener, removeNotificationListener, removeNotificationListener, sendAttributeChangeNotification, sendAttributeChangeNotification, sendNotification, sendNotification, setAttribute, setAttributes, setManagedBean, setManagedResource, toStringprotected Registry registry
protected ManagedBean managed
ManagedBean information describing this MBean.public UserMBean()
          throws MBeanException,
                 RuntimeOperationsException
ModelMBean with default
 ModelMBeanInfo information.MBeanException - if the initializer of an object
  throws an exceptionRuntimeOperationsException - if an IllegalArgumentException
  occurspublic String[] getGroups()
public String[] getRoles()
public void addGroup(String groupname)
Group to those this user belongs to.groupname - Group name of the new grouppublic void addRole(String rolename)
Role to those this user belongs to.rolename - Role name of the new rolepublic void removeGroup(String groupname)
Group from those this user belongs to.groupname - Group name of the old groupCopyright © 2000-2020 Apache Software Foundation. All Rights Reserved.