|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter
org.objectweb.jonas.security.realm.factory.AbstractJResource
public abstract class AbstractJResource
This class implements JOnAS realm factory objects. It is build from an xml file by the security service of JOnAS.
Field Summary |
---|
Fields inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter |
---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
Constructor Summary | |
---|---|
AbstractJResource()
Constructor. |
Method Summary | |
---|---|
void |
addNotificationListener(NotificationListener arg0,
NotificationFilter arg1,
Object arg2)
Allows for listener objects to receive notifications emitted by this resource. |
void |
clearCache()
Clear the cache |
static org.objectweb.util.monolog.api.Logger |
getLogger()
|
String |
getName()
Get the name of this resource |
protected long |
getSequenceNumber()
Return a sequence number and increase this number. |
Hashtable |
getUsers()
Return users |
protected void |
registerGroupMBean(Group group)
Create and register an MBean for the group |
protected void |
registerMBean(Object mbean,
ObjectName on)
Allows the resource to register associated MBeans. |
protected void |
registerRoleMBean(Role role)
Create and register an MBean for this role |
protected void |
registerUserMBean(User user)
Create and register an MBean for the user. |
void |
saveConfig()
Save the resource configuration. |
static void |
setLogger(org.objectweb.util.monolog.api.Logger logger)
|
void |
setName(String name)
Set the name of this resource |
void |
setUsers(Hashtable users)
|
protected void |
unregisterGroupMBean(String resourceName,
String groupName)
Unregister MBean associated to a group |
protected void |
unregisterMBean(ObjectName on)
Allows the resource to unregister associated MBeans. |
protected void |
unregisterRoleMBean(String resourceName,
String roleName)
|
protected void |
unregisterUserMBean(String resourceName,
String userName)
Unregister MBean associated to a user. |
Methods inherited from class org.objectweb.jonas.management.reconfig.emitter.ReconfigEmitter |
---|
initLogger, sendReconfigNotification, sendSaveNotification |
Methods inherited from class javax.management.NotificationBroadcasterSupport |
---|
getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.naming.Referenceable |
---|
getReference |
Methods inherited from interface org.objectweb.jonas.security.realm.factory.JResource |
---|
findUser, getArrayListCombinedRoles, getReference, isValidUser, removeMBeans |
Constructor Detail |
---|
public AbstractJResource() throws Exception
Exception
- if a service can't be retrievedMethod Detail |
---|
public void setName(String name)
JResource
setName
in interface JResource
name
- the resource (realm) namepublic String getName()
JResource
getName
in interface JResource
getName
in interface JResourceMBean
public Hashtable getUsers()
JResource
getUsers
in interface JResource
protected long getSequenceNumber()
public void saveConfig()
saveConfig
in interface JResourceMBean
public static org.objectweb.util.monolog.api.Logger getLogger()
public static void setLogger(org.objectweb.util.monolog.api.Logger logger)
logger
- The logger to set.public void setUsers(Hashtable users)
setUsers
in interface JResource
users
- the users tablepublic void clearCache()
JResource
clearCache
in interface JResource
public void addNotificationListener(NotificationListener arg0, NotificationFilter arg1, Object arg2)
addNotificationListener
in interface NotificationBroadcaster
addNotificationListener
in class NotificationBroadcasterSupport
arg0
- listener objectarg1
- notification filterarg2
- handback objectprotected void registerUserMBean(User user) throws MalformedObjectNameException
user
- the user to be managed
MalformedObjectNameException
- if we could not construct ObjectName for the userprotected void unregisterUserMBean(String resourceName, String userName) throws MalformedObjectNameException
resourceName
- userName
-
MalformedObjectNameException
- if MBean is not unregisteredprotected void registerGroupMBean(Group group) throws MalformedObjectNameException
group
- the group to be managed
MalformedObjectNameException
- if MBean is not createdprotected void unregisterGroupMBean(String resourceName, String groupName) throws MalformedObjectNameException
resourceName
- groupName
-
MalformedObjectNameException
- could not construct ObjectName for the userprotected void registerRoleMBean(Role role) throws MalformedObjectNameException
role
- the role to be managed
MalformedObjectNameException
- not construct ObjectName for this roleprotected void unregisterRoleMBean(String resourceName, String roleName) throws MalformedObjectNameException
resourceName
- roleName
-
MalformedObjectNameException
- could not construct ObjectName for this roleprotected void registerMBean(Object mbean, ObjectName on)
mbean
- MBean to registeron
- MBean's ObjectNameprotected void unregisterMBean(ObjectName on)
on
- MBean's ObjectName
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |