|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.MBeanBroker
public class MBeanBroker
An MBean broker resolving MBean references and supporting access to their properties and methods. Internally, it utilizes services provided by the default broker.
It may be used in situations where direct access to the above services is not available, like in template contexts and scripting environments. It can also resolve parameter signatures automatically based on their class types, which makes script access to MBeans more convenient.
| Field Summary | |
|---|---|
static String |
MBEAN_BROKER
The global MBean broker bean. |
| Constructor Summary | |
|---|---|
MBeanBroker()
Constructs a new broker. |
|
MBeanBroker(MBeanServer server)
Constructs a new broker for a specific server. |
|
| Method Summary | |
|---|---|
ObjectName |
adapt(String className)
Adapts and registers an MBean with the default name. |
ObjectName |
adapt(String className,
ObjectName name)
Adapts and registers an MBean with an object name . |
ObjectName |
adapt(String className,
ObjectName name,
String ifname)
Adapts and registers an MBean with an object name and interface. |
ObjectName |
adapt(String className,
ObjectName name,
String ifname,
Object params)
Adapts and registers an MBean with an object name, interface and parameters. |
ObjectName |
adapt(String className,
ObjectName name,
String ifname,
ObjectName loader,
Object params,
Object sign)
Adapts and registers an MBean with an object name, interface, class loader, parameters and signature. |
ObjectName |
adapt(String className,
ObjectName name,
String ifname,
Object params,
Object sign)
Adapts and registers an MBean with an object name, interface, parameters and signature. |
ObjectName |
adapt(String className,
String ifname)
Adapts and registers an MBean with the default name and interface. |
ObjectName |
adapt(String className,
String name,
String ifname)
Adapts and registers an MBean with a string name and interface. |
ObjectName |
adapt(String className,
String name,
String ifname,
Object params)
Adapts and registers an MBean with a string name, interface and parameters. |
ObjectName |
adapt(String className,
String name,
String ifname,
Object params,
Object sign)
Adapts and registers an MBean with a string name, interface, parameters and signature. |
ObjectName |
adapt(String className,
String name,
String ifname,
String loader,
Object params,
Object sign)
Adapts and registers an MBean with a string name, interface, class loader, parameters and signature. |
ObjectName |
create(String className)
Creates and registers an MBean with the default name. |
ObjectName |
create(String className,
ObjectName name)
Creates and registers an MBean with an object name. |
ObjectName |
create(String className,
ObjectName name,
Object params)
Creates and registers an MBean with an object name and parameters. |
ObjectName |
create(String className,
ObjectName name,
ObjectName loader,
Object params,
Object sign)
Creates and registers an MBean with an object name, class loader, parameters and signature. |
ObjectName |
create(String className,
ObjectName name,
Object params,
Object sign)
Creates and registers an MBean with an object name, parameters and signature. |
ObjectName |
create(String className,
String name)
Creates and registers an MBean with a string name. |
ObjectName |
create(String className,
String name,
Object params)
Creates and registers an MBean with a string name and parameters. |
ObjectName |
create(String className,
String name,
Object params,
Object sign)
Creates and registers an MBean with a string name, parameters and signature. |
ObjectName |
create(String className,
String name,
String loader,
Object params,
Object sign)
Creates and registers an MBean with a string name, class loader, parameters and signature. |
Object |
find(ObjectName name)
Finds the referent of the specified MBean. |
Object |
find(ObjectName name,
String className)
Finds a direct reference to the specified MBean implementing a specific class. |
Object |
find(String spec)
Finds the referent of the specified MBean. |
Object |
find(String name,
String className)
Finds the referent of the MBean with the specified name string implementing a specific class. |
ObjectName |
findName(ObjectName name)
Finds an object name of the specified MBean. |
ObjectName |
findName(ObjectName name,
String className)
Finds an object name of the specified MBean implementing a specific class. |
ObjectName |
findName(String spec)
Finds the object name of the specified MBean. |
ObjectName |
findName(String name,
String className)
Finds the object name of the MBean with the specified name string implementing a specific class. |
Set |
findNames(boolean all)
Finds a set of object names registered to the domains of this application. |
Set |
findNames(boolean all,
String className)
Finds a set of object names implementing a specific class registered to the domains of this application. |
Set |
findNames(ObjectName name)
Finds a set of object name of the specified MBeans. |
Set |
findNames(ObjectName name,
String className)
Finds a set of object name of the specified MBeans implementing a specific class. |
Set |
findNames(String spec)
Finds a set of object names of the specified MBeans. |
Set |
findNames(String name,
String className)
Finds a set of object name of MBeans with the specified name string implementing a specific class. |
Object |
get(ObjectName name,
String key)
Gets an attribute value of the specified MBean. |
Object |
get(ObjectName name,
String key,
Object tag)
Gets a taggeg attribute value of the specified MBean. |
Object |
get(String spec,
String key)
Gets an attribute value of the specified MBean. |
Object |
get(String spec,
String key,
String tag)
Gets a tagged attribute value of the specified MBean. |
String[] |
getAllDomains()
Gets all domains. |
protected Broker |
getBroker()
Gets the broker. |
String |
getClassName(ObjectName name)
Gets the class name of the specified MBean. |
String |
getClassName(String spec)
Gets the class name of the specified MBean. |
String |
getDefaultDomain()
Gets the default domain. |
protected Domain |
getDomain()
Gets the domain. |
String |
getDomainName()
Gets the domain name. |
String[] |
getDomainNames()
Gets the domain names. |
protected Factory |
getFactory()
Gets the factory. |
MBeanInfo |
getInfo(ObjectName name)
Gets MBean info about the specified MBean. |
MBeanInfo |
getInfo(String spec)
Gets MBean info about the specified MBean. |
protected LoaderMBean |
getLoader()
Gets the loader. |
Log |
getLog()
Gets a log. |
MBeanServer |
getMBeanServer()
Gets a reference to the MBean server. |
Package |
getPackage(String name)
Gets the named package. |
Package[] |
getPackages()
Gets all known packages. |
String |
getSystemProperty(String name)
Gets a system property. |
Object |
instantiate(String className)
Intantiates an object. |
Object |
instantiate(String className,
Object params)
Intantiates an object with parameters. |
Object |
instantiate(String className,
Object params,
Object sign)
Intantiates an object with parameters and a signature. |
Object |
invoke(ObjectName name,
String method)
Invokes a method of the specified MBean. |
Object |
invoke(ObjectName name,
String method,
Object params)
Invokes a method of the specified MBean with parameters. |
Object |
invoke(ObjectName name,
String method,
Object params,
Object sign)
Invokes a method of the specified MBean with parameters and a signature. |
Object |
invoke(String spec,
String method)
Invokes a method of the specified MBean. |
Object |
invoke(String spec,
String method,
Object params)
Invokes a method of the specified MBean with parameters. |
Object |
invoke(String spec,
String method,
Object params,
Object sign)
Invokes a method of the specified MBean with parameters and a signature. |
boolean |
isDefined(String className)
Checks whether a class is defined. |
boolean |
isInstanceOf(ObjectName name,
String className)
Checks whether the named MBean implements a specific class. |
boolean |
isInstanceOf(String name,
String className)
Checks whether an MBean with a string name implements a specific class. |
boolean |
isRegistered(ObjectName name)
Checks whether the named MBean is registered. |
boolean |
isRegistered(String name)
Checks whether an MBean with a string name is registered. |
Class |
load(String className)
Loads a class. |
ObjectName |
register(Object object)
Registers an unnamed MBean. |
ObjectName |
register(Object object,
ObjectName name)
Registers the named MBean. |
ObjectName |
register(Object object,
ObjectName name,
String ifname)
Registers the named MBean exposing the specified class or interface. |
ObjectName |
register(Object object,
String name)
Registers an MBean with a string name. |
void |
set(ObjectName name,
String key,
Object value)
Sets an attribute value of the specified MBean. |
void |
set(ObjectName name,
String key,
Object tag,
Object value)
Sets a tagged attribute value of the specified MBean. |
void |
set(ObjectName name,
String key,
Object tag,
Object value,
String type)
Sets a tagged and typed attribute value of the specified MBean. |
void |
set(String spec,
String key,
Object value)
Sets an attribute value of the specified MBean. |
void |
set(String spec,
String key,
Object tag,
Object value)
Sets a tagged attribute value of the specified MBean. |
void |
set(String spec,
String key,
Object tag,
Object value,
String type)
Sets a tagged and typed attribute value of the specified MBean. |
void |
setAlias(String alias,
ObjectName name)
Sets an alias for the specified MBean. |
void |
setAlias(String alias,
String spec)
Sets an alias for the specified MBean. |
void |
setFactory(String className,
ObjectName name)
Sets the factory MBean for the specified class name. |
void |
setFactory(String className,
String spec)
Sets the factory MBean for the specified class name. |
protected void |
setMBeanServer(MBeanServer server)
Sets a reference to the MBean server. |
void |
setSystemProperty(String name,
String value)
Sets a system property. |
ObjectName |
toObjectName(String name)
Converts a string to an object name. |
String |
toPackageName(String uri)
Converts an URI path to a package name. |
void |
unregister(ObjectName name)
Unregisters the named MBean. |
void |
unregister(String name)
Unregisters an MBean with a string name. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String MBEAN_BROKER
| Constructor Detail |
|---|
public MBeanBroker()
public MBeanBroker(MBeanServer server)
server - the MBean server.| Method Detail |
|---|
public Set findNames(boolean all)
all - true for all names, false for default names.
public Set findNames(boolean all,
String className)
all - true for all names, false for default names.className - the class name.
public Object find(String spec)
spec - the MBean specification.
public ObjectName findName(String spec)
spec - the MBean specification.
public Set findNames(String spec)
spec - the MBean specification.
public Object find(String name,
String className)
name - the name string or pattern.className - the class name.
public ObjectName findName(String name,
String className)
name - the name string or pattern.className - the class name.
public Set findNames(String name,
String className)
name - the name string or pattern.className - the class name.
public Object find(ObjectName name)
name - the MBean name.
public ObjectName findName(ObjectName name)
name - the MBean name.
public Set findNames(ObjectName name)
name - the MBean name.
public Object find(ObjectName name,
String className)
name - the MBean name.className - the class name.
public ObjectName findName(ObjectName name,
String className)
name - the MBean name.className - the class name.
public Set findNames(ObjectName name,
String className)
name - the MBean name.className - the class name.
public String getClassName(String spec)
throws LogException
spec - the MBean specification.
LogException - on errors.
public MBeanInfo getInfo(String spec)
throws LogException
spec - the MBean specification.
LogException - on errors.
public void setAlias(String alias,
String spec)
alias - the alias key.spec - the MBean specification.
public void setFactory(String className,
String spec)
className - the class name.spec - the MBean specification.
public Object get(String spec,
String key)
throws LogException
spec - the MBean specification.key - the attribute key.
LogException - on errors.
public void set(String spec,
String key,
Object value)
throws LogException
spec - the MBean specification.key - the attribute key.value - the attribute value.
LogException - on errors.
public Object get(String spec,
String key,
String tag)
throws LogException
spec - the MBean specification.key - the attribute key.tag - the attribute tag.
LogException - on errors.
public void set(String spec,
String key,
Object tag,
Object value)
throws LogException
spec - the MBean specification.key - the attribute key.tag - the attribute tag.value - the attribute value.
LogException - on errors.
public void set(String spec,
String key,
Object tag,
Object value,
String type)
throws LogException
spec - the MBean specification.key - the attribute key.tag - the attribute tag.value - the attribute value.type - the attribute type.
LogException - on errors.
public Object invoke(String spec,
String method)
throws LogException
spec - the MBean specification.method - the method name.
LogException - on errors.
public Object invoke(String spec,
String method,
Object params)
throws LogException
spec - the MBean specification.method - the method name.params - the parameters to the method.
LogException - on errors.
public Object invoke(String spec,
String method,
Object params,
Object sign)
throws LogException
null or also a list.
spec - the MBean specification.method - the method name.params - the parameters to the method.sign - the signature of the parameters.
LogException - on errors.
public ObjectName create(String className)
throws LogException
className - the class name of the MBean.
LogException - on errors.
public ObjectName create(String className,
String name)
throws LogException
className - the class name of the MBean.name - the string name of the MBean.
LogException - on errors.
public ObjectName create(String className,
String name,
Object params)
throws LogException
className - the class name of the MBean.name - the string name of the MBean.params - the parameter to the constructor.
LogException - on errors.
public ObjectName create(String className,
String name,
Object params,
Object sign)
throws LogException
null or also a list.
className - the class name of the MBean.name - the string name of the MBean.params - the parameter to the constructor.sign - the signature of the parameters.
LogException - on errors.
public ObjectName create(String className,
String name,
String loader,
Object params,
Object sign)
throws LogException
null or also a
list.
className - the class name of the MBean.name - the string name of the MBean.loader - the string name of the loader.params - the parameter to the constructor.sign - the signature of the parameters.
LogException - on errors.
public ObjectName adapt(String className)
throws LogException
className - the class name of the MBean.
LogException - on errors.
public ObjectName adapt(String className,
String ifname)
throws LogException
className - the class name of the MBean.ifname - the interface of the MBean.
LogException - on errors.
public ObjectName adapt(String className,
String name,
String ifname)
throws LogException
className - the class name of the MBean.name - the string name of the MBean.ifname - the interface of the MBean.
LogException - on errors.
public ObjectName adapt(String className,
String name,
String ifname,
Object params)
throws LogException
className - the class name of the MBean.name - the string name of the MBean.ifname - the interface of the MBean.params - the parameter to the constructor.
LogException - on errors.
public ObjectName adapt(String className,
String name,
String ifname,
Object params,
Object sign)
throws LogException
null or also a list.
className - the class name of the MBean.name - the string name of the MBean.ifname - the interface of the MBean.params - the parameter to the constructor.sign - the signature of the parameters.
LogException - on errors.
public ObjectName adapt(String className,
String name,
String ifname,
String loader,
Object params,
Object sign)
throws LogException