|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.oddjob.jmx.server.OddjobJMXFileAccessController
public class OddjobJMXFileAccessController
This is a big rip off of
com.sun.jmx.remote.security.MBeanServerFileAccessController
Field Summary | |
---|---|
static String |
READONLY
|
static String |
READWRITE
|
Constructor Summary | |
---|---|
OddjobJMXFileAccessController(Properties accessFileProps)
Create a new MBeanServerAccessController that forwards all the MBeanServer requests to the MBeanServer set by invoking the #setMBeanServer method after doing access checks based on read and
write permissions. |
|
OddjobJMXFileAccessController(String accessFileName)
Create a new MBeanServerAccessController that forwards all the MBeanServer requests to the MBeanServer set by invoking the #setMBeanServer method after doing access checks based on read and
write permissions. |
Method Summary | |
---|---|
boolean |
isAccessable(MBeanOperationInfo opInfo)
|
void |
refresh()
Refresh the set of username/access level entries. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String READONLY
public static final String READWRITE
Constructor Detail |
---|
public OddjobJMXFileAccessController(String accessFileName) throws IOException
Create a new MBeanServerAccessController that forwards all the
MBeanServer requests to the MBeanServer set by invoking the #setMBeanServer
method after doing access checks based on read and
write permissions.
This instance is initialized from the specified properties file.
accessFileName
- name of the file which denotes a properties
file on disk containing the username/access level entries.
IOException
- if the file does not exist, is a
directory rather than a regular file, or for some other
reason cannot be opened for reading.
IllegalArgumentException
- if any of the supplied access
level values differs from "readonly" or "readwrite".public OddjobJMXFileAccessController(Properties accessFileProps) throws IOException
Create a new MBeanServerAccessController that forwards all the
MBeanServer requests to the MBeanServer set by invoking the #setMBeanServer
method after doing access checks based on read and
write permissions.
This instance is initialized from the specified properties instance.
This constructor makes a copy of the properties instance using its
clone
method and it is the copy that is consulted to check
the username and access level of an incoming connection. The original
properties object can be modified without affecting the copy. If the
refresh()
method is then called, the
MBeanServerFileAccessController
will make a new copy of the
properties object at that time.
accessFileProps
- properties list containing the username/access
level entries.
IllegalArgumentException
- if accessFileProps
is
null
or if any of the supplied access level values differs
from "readonly" or "readwrite".
IOException
Method Detail |
---|
public boolean isAccessable(MBeanOperationInfo opInfo)
isAccessable
in interface OddjobJMXAccessController
public void refresh() throws IOException
Refresh the set of username/access level entries.
If this instance was created using the
#MBeanServerFileAccessController(String)
or
#MBeanServerFileAccessController(String,MBeanServer)
constructors to specify a file from which the entries are read,
the file is re-read.
If this instance was created using the
#MBeanServerFileAccessController(Properties)
or
#MBeanServerFileAccessController(Properties,MBeanServer)
constructors then a new copy of the Properties
object
is made.
IOException
- if the file does not exist, is a
directory rather than a regular file, or for some other
reason cannot be opened for reading.
IllegalArgumentException
- if any of the supplied access
level values differs from "readonly" or "readwrite".
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |