|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.norther.tammi.core.base.Adaptee
org.norther.tammi.core.base.DefaultDomain
public class DefaultDomain
A default implementation of Domain.
| Field Summary | |
|---|---|
protected static String |
MBEAN_CONST_DESCRIPTION
The constructor description. |
protected static String |
MBEAN_INFO_DESCRIPTION
The adaptee 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, LINUX, MACOS, OS_NAME_PROPERTY, OS_TYPE_PROPERTY, SUNOS, UNKNOWN, WIN32 |
| Fields inherited from interface org.norther.tammi.core.base.MBeanDelegate |
|---|
ARRAY_TYPE, OBJECT_TYPE, PRIMITIVE_TYPE, STRING_TYPE |
| 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 |
getBrokerMBean()
Gets a reference to the broker MBean 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. |
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 |
getFactoryMBean()
Gets a reference to the factory MBean of this domain. |
ObjectName |
getFactoryName()
Gets the the factory of this domain. |
LoaderMBean |
getLoader()
Gets the referent of the loader MBean. |
MBeanReference |
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 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 |
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 |
queryDefaultNames()
Queries for a set of object names of MBeans in the default context of this domain. |
Set |
queryDefaultNames(QueryExp exp)
Queries for a set of object names of MBeans in the default context of this domain with a query expression. |
Set |
queryDefaultNames(String className)
Queries for a set of object names of MBeans in the default context of this domain of the specified class. |
Set |
queryObjectNames()
Queries for a set of object names of MBeans in any of the contexts of this domain. |
Set |
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 |
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 MBEAN_INFO_DESCRIPTION
protected static final String MBEAN_CONST_DESCRIPTION
protected static final String OBJECT_REFERENCE
| Constructor Detail |
|---|
public DefaultDomain()
| Method Detail |
|---|
public void premanaged(MBeanDelegate adapter)
throws Exception
Manageable
premanaged in interface Manageablepremanaged in class Adapteeadapter - the managing adapter.
Exception - if the adaptee refused to be managed.public void postmanaged()
Manageable
postmanaged in interface Manageablepostmanaged in class Adaptee
public void unmanaged()
throws Exception
Manageable
unmanaged in interface Manageableunmanaged in class AdapteeException - if the adaptee refused to be unmanaged.public String getOSType()
Domain
getOSType in interface Domainpublic String getOSName()
Domain
getOSName in interface Domainpublic String getDefaultDomain()
Domain
getDefaultDomain in interface Domainpublic String getDomainName()
Domain
getDomainName in interface Domainpublic String[] getDomainNames()
Domain
getDomainNames in interface Domainpublic ObjectName getDefaultQuery()
Domain
getDefaultQuery in interface Domainpublic Set queryDefaultNames()
Domain
queryDefaultNames in interface Domainpublic Set queryDefaultNames(QueryExp exp)
Domain
queryDefaultNames in interface Domainexp - an optional query expression.
public Set queryDefaultNames(String className)
Domain
queryDefaultNames in interface DomainclassName - a class or interface, null for any.
public Set queryObjectNames()
Domain
queryObjectNames in interface Domainpublic Set queryObjectNames(QueryExp exp)
Domain
queryObjectNames in interface Domainexp - an optional query expression.
public Set queryObjectNames(String className)
Domain
queryObjectNames in interface DomainclassName - a class or interface, null for any.
public String getProperty(String key)
Domain
getProperty in interface Domainkey - the key of the system property.
public String getProperty(String key,
String def)
Domain
getProperty in interface Domainkey - the key of the system property.def - the default value.
public void setProperty(String key,
String value)
Domain
setProperty in interface Domainkey - the key of the system property.value - the value of the system property.public Properties properties()
Domain
properties in interface Domainpublic String getModelMBeanClassName()
Domain
getModelMBeanClassName in interface Domainpublic void setModelMBeanClassName(String className)
Domain
setModelMBeanClassName in interface DomainclassName - the model MBean class name.
public MBeanInfo getMBeanInfo(ObjectName name)
throws RegistrationException
Domain
getMBeanInfo in interface Domainname - the object name of the MBean.
RegistrationException - if not registered.
public ObjectInstance getObjectInstance(ObjectName name)
throws RegistrationException
Domain
getObjectInstance in interface Domainname - the object name of the MBean.
RegistrationException - if not registered.
public boolean isInstanceOf(ObjectName name,
String className)
throws RegistrationException
Domain
isInstanceOf in interface Domainname - 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 Domainobject - 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 Domainobject - 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 Domainobject - 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 Domainobject - 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
DomainThis 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 Domainobject - 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
DomainThis 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 Domainobject - 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 DomainclassName - 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 DomainclassName - 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 DomainclassName - 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 DomainclassName - 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