|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.management.NotificationBroadcasterSupport org.ow2.jonas.lib.reconfig.ReconfigEmitter org.ow2.jonas.security.internal.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.ow2.jonas.lib.reconfig.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<String,JUser> |
getUsers()
Return users. |
protected void |
registerGroupMBean(Group group)
Create and register an MBean for the group. |
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. |
void |
setDomainName(String domain)
Set the domain name |
void |
setJmxService(JmxService jmx)
Set the jmx service reference |
static void |
setLogger(org.objectweb.util.monolog.api.Logger logger)
|
void |
setName(String name)
Set the name of this resource. |
void |
setSecurityService(SecurityService sec)
Set the security service reference |
void |
setUsers(Hashtable<String,JUser> users)
|
protected void |
unregisterGroupMBean(String resourceName,
String groupName)
Unregister MBean associated to a group. |
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.ow2.jonas.lib.reconfig.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.ow2.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 setDomainName(String domain)
JResource
setDomainName
in interface JResource
domain
- the domain namepublic void setJmxService(JmxService jmx)
JResource
setJmxService
in interface JResource
jmx
- the jmx service referencepublic void setSecurityService(SecurityService sec)
JResource
setSecurityService
in interface JResource
sec
- security service referencepublic void setName(String name)
JResource
setName
in interface JResource
name
- the resource (realm) namepublic String getName()
JResourceMBean
getName
in interface JResourceMBean
getName
in interface JResource
public Hashtable<String,JUser> 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<String,JUser> 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 role
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |