|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.norther.tammi.core.base.Adaptee org.norther.tammi.core.base.DefaultDomain
public class DefaultDomain
A default implementation of Domain.
Field Summary | |
---|---|
protected static String |
MODEL_CONST_DESCRIPTION
The model constructor description. |
protected static String |
OBJECT_REFERENCE
The object reference resource type. |
Fields inherited from class org.norther.tammi.core.base.Adaptee |
---|
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS |
Fields inherited from interface org.norther.tammi.core.base.Domain |
---|
ANY_DOMAIN, HPUX, LNX32, LNX64, MACOS, OS_ARCH_PROPERTY, OS_NAME_PROPERTY, OS_TYPE_PROPERTY, SUNOS, UNKNOWN, WIN32, WIN64 |
Constructor Summary | |
---|---|
DefaultDomain()
Constructs a new domain. |
Method Summary | |
---|---|
ModelMBean |
adapt(Object object,
String ifName)
Adapts the specified object exposing the specified class or interface by applying the default model MBean and the domain MBean loader. |
ModelMBean |
adapt(Object object,
String ifName,
ObjectName loader)
Adapts the specified object exposing the specified class or interface by applying the default model MBean and the named MBean loader. |
ModelMBean |
adapt(Object object,
String ifName,
ObjectName loader,
MBeanServer server)
Adapts the specified object exposing the specified class or interface by applying the named MBean loader in the given MBean server. |
ModelMBean |
adapt(Object object,
String ifName,
String modelName)
Adapts the specified object exposing the specified class or interface by applying the specified model MBean and the domain MBean loader. |
ModelMBean |
adapt(Object object,
String ifName,
String modelName,
ObjectName loader)
Adapts the specified object exposing the specified class or interface by applying the specified model MBean and the named MBean loader. |
ModelMBean |
adapt(Object object,
String ifName,
String modelName,
ObjectName loader,
MBeanServer server)
Adapts the specified object exposing the specified class or interface by applying the specified model MBean, the named MBean loader in the given MBean server. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName)
Adapts a named MBean exposing the specified class or interface by applying the default model MBean and the domain MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
Object[] params,
String[] signature)
Adapts a named MBean exposing the specified class or interface with parameters by applying the default model MBean and the domain MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
ObjectName loader)
Adapts a named MBean exposing the specified class or interface by applying the default model MBean and the named MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
ObjectName loader,
Object[] params,
String[] signature)
Adapts a named MBean exposing the specified class or interface with parameters by applying the default model MBean and the named MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
String modelName)
Adapts a named MBean exposing the specified class or interface by applying the specified model MBean and the domain MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
String modelName,
Object[] params,
String[] signature)
Adapts a named MBean exposing the specified class or interface with parameters by applying the specified model MBean and the domain MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
String modelName,
ObjectName loader)
Adapts a named MBean exposing the specified class or interface by applying the specified model MBean and the named MBean loader. |
ObjectInstance |
adaptMBean(String className,
ObjectName name,
String ifName,
String modelName,
ObjectName loader,
Object[] params,
String[] signature)
Adapts a named MBean exposing the specified class or interface with parameters by applying the specified model MBean and the named MBean loader. |
ObjectInstance |
createMBean(String className,
ObjectName name)
Creates a named MBean by applying the domain MBean loader. |
ObjectInstance |
createMBean(String className,
ObjectName name,
Object[] params,
String[] signature)
Creates a named MBean with parameters by applying the domain MBean loader. |
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loader)
Creates a named MBean by applying the named MBean loader. |
ObjectInstance |
createMBean(String className,
ObjectName name,
ObjectName loader,
Object[] params,
String[] signature)
Creates a named MBean with parameters by applying the named MBean loader. |
Broker |
getBroker()
Gets the referent of the broker MBean. |
MBeanReference<Broker> |
getBrokerMBean()
Gets a reference to the broker of this domain. |
ObjectName |
getBrokerName()
Gets the broker of this domain. |
String |
getDefaultDomain()
Gets the name with the default context of this domain. |
ObjectName |
getDefaultQuery()
Gets a query to the default context of this domain. |
Domain |
getDomain()
Gets the referent of the domain MBean. |
MBeanReference<Domain> |
getDomainMBean()
Gets a reference to the domain MBean of this domain. |
String |
getDomainName()
Gets the name without the context of this domain. |
String[] |
getDomainNames()
Gets the domain names without the contexts of this domain. |
Factory |
getFactory()
Gets the referent of the factory MBean. |
MBeanReference<Factory> |
getFactoryMBean()
Gets a reference to the factory of this domain. |
ObjectName |
getFactoryName()
Gets the the factory of this domain. |
Loader |
getLoader()
Gets the referent of the loader MBean. |
MBeanReference<Loader> |
getLoaderMBean()
Gets a reference to the loader MBean of this domain. |
ObjectName |
getLoaderName()
Gets the loader of this domain. |
MBeanInfo |
getMBeanInfo(ObjectName name)
Gets the MBean info the named MBean. |
String |
getModelMBeanClassName()
Gets the model MBean class name. |
ObjectInstance |
getObjectInstance(ObjectName name)
Gets the object instance the named MBean. |
ObjectName |
getObjectName(String name)
Gets a string as an object name. |
ObjectName |
getObjectName(String domain,
Hashtable<String,String> table)
Gets a hashtable as an object name using the specified domain. |
ObjectName |
getObjectName(String domain,
String key,
String value)
Gets a key property as an object name using the given domain. |
String |
getOSArch()
Gets the OS architecture. |
String |
getOSName()
Gets the OS name. |
String |
getOSType()
Gets the OS type. |
String |
getProperty(String key)
Gets the specified system property. |
String |
getProperty(String key,
String def)
Gets the specified system property with a default. |
protected void |
introspect(RequiredModelMBean model,
Object adaptee,
Class<?> clazz)
Instrospects the public methods of the managed class. |
boolean |
isInstanceOf(ObjectName name,
String className)
Checks the class of the named MBean. |
boolean |
isRegistered(ObjectName name)
Checks registration of the named MBean. |
void |
postmanaged()
This method is called when the implementing adaptee has been managed either during post-registration of the corresponding adapter MBean or just after it is explicitly added to the adapter MBean during run-time. |
void |
premanaged(MBeanDelegate adapter)
This method is called when the implementing adaptee is trying to be managed either during pre-registration of the corresponding adapter MBean or just before it is explicitly added to the adapter MBean during run-time. |
Properties |
properties()
Gets the current map of system properties. |
Set<ObjectName> |
queryDefaultNames()
Queries for a set of object names of MBeans in the default context of this domain. |
Set<ObjectName> |
queryDefaultNames(QueryExp exp)
Queries for a set of object names of MBeans in the default context of this domain with a query expression. |
Set<ObjectName> |
queryDefaultNames(String className)
Queries for a set of object names of MBeans in the default context of this domain of the specified class. |
Set<ObjectName> |
queryObjectNames()
Queries for a set of object names of MBeans in any of the contexts of this domain. |
Set<ObjectName> |
queryObjectNames(QueryExp exp)
Queries for a set of object names of MBeans in any of the contexts of this domain with a query expression. |
Set<ObjectName> |
queryObjectNames(String className)
Queries for a set of object names of MBeans in any of the contexts of this domain of the specified class. |
ObjectInstance |
registerMBean(Object object,
ObjectName name)
Registers the named MBean. |
ObjectInstance |
registerMBean(Object object,
ObjectName name,
String ifName)
Registers the named MBean exposing the specified class or interface by applying the default model MBean. |
ObjectInstance |
registerMBean(Object object,
ObjectName name,
String ifName,
String modelName)
Registers the named MBean exposing the specified class or interface by applying the specified model MBean. |
void |
setBrokerName(ObjectName broker)
Sets the broker of this domain. |
void |
setFactoryName(ObjectName logger)
Sets the factory of this domain. |
void |
setLoaderName(ObjectName loader)
Sets the loader of this domain. |
void |
setModelMBeanClassName(String className)
Sets the model MBean class name. |
void |
setProperty(String key,
String value)
Sets the specified system property. |
void |
unmanaged()
This method is called when the implementing adaptee is unmanaged either during pre-deregistration of the corresponding adapter MBean or just before it is explicitly removed from the adapter MBean during run-time. |
void |
unregisterMBean(ObjectName name)
Unregisters the named MBean. |
Methods inherited from class org.norther.tammi.core.base.Adaptee |
---|
addAdaptee, addNotificationListener, getAttributeSupport, getCanonicalName, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unregister |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final String OBJECT_REFERENCE
protected static final String MODEL_CONST_DESCRIPTION
Constructor Detail |
---|
public DefaultDomain()
Method Detail |
---|
public void premanaged(MBeanDelegate adapter) throws Exception
Manageable
premanaged
in interface Manageable
premanaged
in class Adaptee
adapter
- the managing adapter.
Exception
- if the adaptee refused to be managed.public void postmanaged()
Manageable
postmanaged
in interface Manageable
postmanaged
in class Adaptee
public void unmanaged() throws Exception
Manageable
unmanaged
in interface Manageable
unmanaged
in class Adaptee
Exception
- if the adaptee refused to be unmanaged.public String getOSType()
Domain
getOSType
in interface Domain
public String getOSName()
Domain
getOSName
in interface Domain
public String getOSArch()
Domain
getOSArch
in interface Domain
public String getDefaultDomain()
Domain
getDefaultDomain
in interface Domain
public String getDomainName()
Domain
getDomainName
in interface Domain
public String[] getDomainNames()
Domain
getDomainNames
in interface Domain
public ObjectName getDefaultQuery()
Domain
getDefaultQuery
in interface Domain
public Set<ObjectName> queryDefaultNames()
Domain
queryDefaultNames
in interface Domain
public Set<ObjectName> queryDefaultNames(QueryExp exp)
Domain
queryDefaultNames
in interface Domain
exp
- an optional query expression.
public Set<ObjectName> queryDefaultNames(String className)
Domain
queryDefaultNames
in interface Domain
className
- a class or interface, null for any.
public Set<ObjectName> queryObjectNames()
Domain
queryObjectNames
in interface Domain
public Set<ObjectName> queryObjectNames(QueryExp exp)
Domain
queryObjectNames
in interface Domain
exp
- an optional query expression.
public Set<ObjectName> queryObjectNames(String className)
Domain
queryObjectNames
in interface Domain
className
- a class or interface, null for any.
public String getProperty(String key)
Domain
getProperty
in interface Domain
key
- the key of the system property.
public String getProperty(String key, String def)
Domain
getProperty
in interface Domain
key
- the key of the system property.def
- the default value.
public void setProperty(String key, String value)
Domain
setProperty
in interface Domain
key
- the key of the system property.value
- the value of the system property.public Properties properties()
Domain
properties
in interface Domain
public String getModelMBeanClassName()
Domain
getModelMBeanClassName
in interface Domain
public void setModelMBeanClassName(String className)
Domain
setModelMBeanClassName
in interface Domain
className
- the model MBean class name.public MBeanInfo getMBeanInfo(ObjectName name) throws RegistrationException
Domain
getMBeanInfo
in interface Domain
name
- the object name of the MBean.
RegistrationException
- if not registered.public ObjectInstance getObjectInstance(ObjectName name) throws RegistrationException
Domain
getObjectInstance
in interface Domain
name
- the object name of the MBean.
RegistrationException
- if not registered.public boolean isInstanceOf(ObjectName name, String className) throws RegistrationException
Domain
isInstanceOf
in interface Domain
name
- the object name of the MBean.className
- the class name to check.
RegistrationException
- if not registered.public ModelMBean adapt(Object object, String ifName) throws ConstructionException, AdaptationException
Domain
adapt
in interface Domain
object
- the object instance to adapt.ifName
- the exposed interface of the MBean.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.public ModelMBean adapt(Object object, String ifName, String modelName) throws ConstructionException, AdaptationException
Domain
adapt
in interface Domain
object
- the object instance to adapt.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.public ModelMBean adapt(Object object, String ifName, ObjectName loader) throws ConstructionException, AdaptationException
Domain
adapt
in interface Domain
object
- the object instance to adapt.ifName
- the exposed interface of the MBean.loader
- the object name of the loader.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.public ModelMBean adapt(Object object, String ifName, String modelName, ObjectName loader) throws ConstructionException, AdaptationException
Domain
adapt
in interface Domain
object
- the object instance to adapt.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.loader
- the object name of the loader.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.public ModelMBean adapt(Object object, String ifName, ObjectName loader, MBeanServer server) throws ConstructionException, AdaptationException
Domain
This method can be applied to adapt objects even when the domain is not yet registered; especially the domain itself may be adapted.
adapt
in interface Domain
object
- the object instance to adapt.ifName
- the exposed interface of the MBean.loader
- the object name of the loader.server
- the MBean server to apply.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.public ModelMBean adapt(Object object, String ifName, String modelName, ObjectName loader, MBeanServer server) throws ConstructionException, AdaptationException
Domain
This method can be applied to adapt objects even when the domain is not yet registered; especially the domain itself may be adapted.
adapt
in interface Domain
object
- the object instance to adapt.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.loader
- the object name of the loader.server
- the MBean server to apply.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.public ObjectInstance createMBean(String className, ObjectName name) throws ConstructionException, RegistrationException
Domain
createMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.
ConstructionException
- if construction fails.
RegistrationException
- if registration fails.public ObjectInstance createMBean(String className, ObjectName name, Object[] params, String[] signature) throws ConstructionException, RegistrationException
Domain
createMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.params
- an array of parameters.signature
- the signature.
ConstructionException
- if construction fails.
RegistrationException
- if registration fails.public ObjectInstance createMBean(String className, ObjectName name, ObjectName loader) throws ConstructionException, RegistrationException
Domain
createMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.loader
- the object name of the loader.
ConstructionException
- if construction fails.
RegistrationException
- if registration fails.public ObjectInstance createMBean(String className, ObjectName name, ObjectName loader, Object[] params, String[] signature) throws ConstructionException, RegistrationException
Domain
createMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.loader
- the object name of the loader.params
- an array of parameters.signature
- the signature.
ConstructionException
- if construction fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, String modelName) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, Object[] params, String[] signature) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.params
- an array of parameters.signature
- the signature.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, String modelName, Object[] params, String[] signature) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.params
- an array of parameters.signature
- the signature.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, ObjectName loader) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.loader
- the object name of the loader.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, String modelName, ObjectName loader) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.loader
- the object name of the loader.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, ObjectName loader, Object[] params, String[] signature) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.loader
- the object name of the loader.params
- an array of parameters.signature
- the signature.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance adaptMBean(String className, ObjectName name, String ifName, String modelName, ObjectName loader, Object[] params, String[] signature) throws ConstructionException, AdaptationException, RegistrationException
Domain
adaptMBean
in interface Domain
className
- the class name of the MBean.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.loader
- the object name of the loader.params
- an array of parameters.signature
- the signature.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance registerMBean(Object object, ObjectName name) throws RegistrationException
Domain
registerMBean
in interface Domain
object
- the MBean object.name
- the object name of the MBean.
RegistrationException
- if registration fails.public ObjectInstance registerMBean(Object object, ObjectName name, String ifName) throws ConstructionException, AdaptationException, RegistrationException
Domain
registerMBean
in interface Domain
object
- the MBean object.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public ObjectInstance registerMBean(Object object, ObjectName name, String ifName, String modelName) throws ConstructionException, AdaptationException, RegistrationException
Domain
registerMBean
in interface Domain
object
- the MBean object.name
- the object name of the MBean.ifName
- the exposed interface of the MBean.modelName
- the model MBean adapter to apply.
ConstructionException
- if construction fails.
AdaptationException
- if adaptation fails.
RegistrationException
- if registration fails.public void unregisterMBean(ObjectName name) throws RegistrationException
Domain
unregisterMBean
in interface Domain
name
- the object name of the MBean.
RegistrationException
- if unregistration fails.public boolean isRegistered(ObjectName name)
Domain
isRegistered
in interface Domain
name
- the object name of the MBean.
public ObjectName getObjectName(String name) throws MalformedObjectNameException
Domain
getObjectName
in interface Domain
name
- the string to convert.
MalformedObjectNameException
- for invalid strings.public ObjectName getObjectName(String domain, Hashtable<String,String> table) throws MalformedObjectNameException
Domain
getObjectName
in interface Domain
domain
- the domain to use.table
- the key table.
MalformedObjectNameException
- for invalid strings.public ObjectName getObjectName(String domain, String key, String value) throws MalformedObjectNameException
Domain
getObjectName
in interface Domain
domain
- the domain to use.key
- the key.value
- the value.
MalformedObjectNameException
- for invalid strings.public ObjectName getLoaderName()
Domain
getLoaderName
in interface Domain
public void setLoaderName(ObjectName loader)
Domain
setLoaderName
in interface Domain
loader
- the object name of the loader or a query.public MBeanReference<Domain> getDomainMBean()
Domain
getDomainMBean
in interface Domain
public MBeanReference<Loader> getLoaderMBean()
Domain
getLoaderMBean
in interface Domain
public ObjectName getBrokerName()
Domain
getBrokerName
in interface Domain
public void setBrokerName(ObjectName broker)
Domain
setBrokerName
in interface Domain
broker
- the object name of the broker or a query.public MBeanReference<Broker> getBrokerMBean()
Domain
getBrokerMBean
in interface Domain
public ObjectName getFactoryName()
Domain
getFactoryName
in interface Domain
public void setFactoryName(ObjectName logger)
Domain
setFactoryName
in interface Domain
logger
- the object name of the factory or a query.public MBeanReference<Factory> getFactoryMBean()
Domain
getFactoryMBean
in interface Domain
public Domain getDomain()
MBeanDelegate
getDomain
in interface MBeanDelegate
getDomain
in class Adaptee
public Loader getLoader()
MBeanDelegate
getLoader
in interface MBeanDelegate
getLoader
in class Adaptee
public Broker getBroker()
MBeanDelegate
getBroker
in interface MBeanDelegate
getBroker
in class Adaptee
public Factory getFactory()
MBeanDelegate
getFactory
in interface MBeanDelegate
getFactory
in class Adaptee
protected void introspect(RequiredModelMBean model, Object adaptee, Class<?> clazz) throws AdaptationException
model
- the model MBean.adaptee
- the adaptee.clazz
- the class to introspect.
AdaptationException
- if introspection fails.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |