wt.jmx.core.mbeans
Interface MBeanLoaderMBean

All Superinterfaces:
SelfEmailingMBean
All Known Implementing Classes:
MBeanLoader

public interface MBeanLoaderMBean
extends SelfEmailingMBean

Provides persistence (load/store ability) for a set of JMX management beans

Supported API: true

Extendable: true


Field Summary
static String LOAD_FINISHED_NOTIF_TYPE
          Notification type produced when this MBean finishes a load operation

Supported API: true
static String LOAD_STARTED_NOTIF_TYPE
          Notification type produced when this MBean starts a load operation

Supported API: true
static String START_NOTIF_TYPE
          Notification type produced when this MBean is started

Supported API: true
static String STOP_NOTIF_TYPE
          Notification type produced when this MBean is stopped

Supported API: true
static String UNLOAD_FINISHED_NOTIF_TYPE
          Notification type produced when this MBean finishes a unload operation (i.e.
static String UNLOAD_STARTED_NOTIF_TYPE
          Notification type produced when this MBean starts a unload operation (i.e.
 
Method Summary
 void addAndNameMBean(String classname, String relativeObjectName)
          Instantiate an MBean and register it under an ObjectName relative to this loader's BaseObjectName.
 void addInjectionTargetMBean(ObjectName objectName)
          Add an ObjectName to this loader's set of injection targets

Supported API: true
 void addObject(String classname)
          Instantiate an object of the specified classname and add it to the set of objects controlled (and saved) by this loader.
 void addObject(String classname, String constructorStringArgument)
          Instantiate an object of the specified classname and add it to the set of objects controlled (and saved) by this loader.
 void addSubloader(String name)
          Instantiate a loader with the given name and add it to the set of objects controlled (and saved) by this loader

Supported API: true
 void emailMBeanConfigFile(String addressesOrEmailList, String subject)
          E-mail the raw MBean config file

Supported API: true
 void emailMBeanConfigFile(String addressesOrEmailList, String subject, String xslt, boolean applyXslt)
          E-mail the styled MBean config file

Supported API: true
 ObjectName getBaseObjectName()
          Object name under which loaded (non-loader) objects will be located; null indicates that the default Windchill domain

Supported API: true
 ObjectName[] getInjectionTargetMBeans()
          ObjectNames that are targeted for injection by this loader.
 ObjectName[] getLoadedObjectNames()
          Known ObjectNames of MBeans currently loaded by this loader

Supported API: true
 ObjectName[] getLoadedObjectNames(String classname)
          Known ObjectNames of MBeans currently loaded by this loader that implement or extend the specified class

Supported API: true
 int getMBeanConfigFileCheckInterval()
          Interval (in seconds) at which MBeanConfigFileRef will be checked for updates; disabled if non-positive

Supported API: true
 String getMBeanConfigFileRef()
          Reference (URL, file path, or resource path) of file from which MBeans will be loaded

Supported API: true
 String getMBeanConfigFileURLString()
          URL from which MBeans will be loaded

Supported API: true
 String getName()
          Name of loader

Supported API: true
 int getNumberOfObjectsLoaded()
          Number of objects currently loaded by this loader

Supported API: true
 Timestamp getTimeLoaded()
          Time MBean configuration completed loading; null during reload()

Supported API: true
 Timestamp getTimeStarted()
          Time MBean was last started; null if stopping or not started

Supported API: true
 boolean isStarted()
          Whether this MBean is currently started, i.e.
 void reload()
          Reload MBeans from configuration file

Supported API: true
 void removeInjectionTargetMBean(ObjectName objectName)
          Remove an ObjectName from this loader's set of injection targets

Supported API: true
 boolean removeObject(ObjectName objectName)
          Remove the object with the given object name from the set of objects controlled by this loader but do not destroy the object

Supported API: true
 boolean removeObject(ObjectName objectName, boolean destroy)
          Remove the object with the given object name from the set of objects controlled by this loader

Supported API: true
 void save()
          Save MBean configuration to file

Supported API: true
 void saveACopyAs(String mbeanConfigFileRef)
          Save MBean configuration to a different file than that currently used (but leave MBeanConfigFileRef unchanged)

Supported API: true
 void saveAs(String mbeanConfigFileRef)
          Save MBean configuration to a different file than that currently used and reset MBeanConfigFileRef to this new file

Supported API: true
 void setMBeanConfigFileCheckInterval(int mbeanConfigFileCheckIntervalInSeconds)
          Interval (in seconds) at which MBeanConfigFileRef will be checked for updates; disabled if non-positive

Supported API: true
 void setMBeanConfigFileRef(String mbeanConfigFileRef)
          Reference (URL, file path, or resource path) of file from which MBeans will be loaded

Supported API: true
 void start()
          Initialize this loader (normally only used internally)

Supported API: true
 void stop()
          Stop this loader (normally only used internally)

Supported API: true
 String[] viewMBeanConfigFile()
          View the MBean config file

Supported API: true
 
Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
 

Field Detail

START_NOTIF_TYPE

static final String START_NOTIF_TYPE
Notification type produced when this MBean is started

Supported API: true


STOP_NOTIF_TYPE

static final String STOP_NOTIF_TYPE
Notification type produced when this MBean is stopped

Supported API: true


LOAD_STARTED_NOTIF_TYPE

static final String LOAD_STARTED_NOTIF_TYPE
Notification type produced when this MBean starts a load operation

Supported API: true


LOAD_FINISHED_NOTIF_TYPE

static final String LOAD_FINISHED_NOTIF_TYPE
Notification type produced when this MBean finishes a load operation

Supported API: true


UNLOAD_STARTED_NOTIF_TYPE

static final String UNLOAD_STARTED_NOTIF_TYPE
Notification type produced when this MBean starts a unload operation (i.e. the first stage of reload())

Supported API: true


UNLOAD_FINISHED_NOTIF_TYPE

static final String UNLOAD_FINISHED_NOTIF_TYPE
Notification type produced when this MBean finishes a unload operation (i.e. the first stage of reload())

Supported API: true

Method Detail

getName

String getName()
Name of loader

Supported API: true


isStarted

boolean isStarted()
Whether this MBean is currently started, i.e. start() has been called more recently than stop().

Supported API: true


getTimeStarted

Timestamp getTimeStarted()
Time MBean was last started; null if stopping or not started

Supported API: true


getTimeLoaded

Timestamp getTimeLoaded()
Time MBean configuration completed loading; null during reload()

Supported API: true


getBaseObjectName

ObjectName getBaseObjectName()
Object name under which loaded (non-loader) objects will be located; null indicates that the default Windchill domain

Supported API: true


getMBeanConfigFileURLString

String getMBeanConfigFileURLString()
URL from which MBeans will be loaded

Supported API: true


getMBeanConfigFileRef

String getMBeanConfigFileRef()
Reference (URL, file path, or resource path) of file from which MBeans will be loaded

Supported API: true


setMBeanConfigFileRef

void setMBeanConfigFileRef(String mbeanConfigFileRef)
                           throws IOException
Reference (URL, file path, or resource path) of file from which MBeans will be loaded

Supported API: true

Throws:
IOException

getMBeanConfigFileCheckInterval

int getMBeanConfigFileCheckInterval()
Interval (in seconds) at which MBeanConfigFileRef will be checked for updates; disabled if non-positive

Supported API: true


setMBeanConfigFileCheckInterval

void setMBeanConfigFileCheckInterval(int mbeanConfigFileCheckIntervalInSeconds)
Interval (in seconds) at which MBeanConfigFileRef will be checked for updates; disabled if non-positive

Supported API: true


getNumberOfObjectsLoaded

int getNumberOfObjectsLoaded()
Number of objects currently loaded by this loader

Supported API: true


getInjectionTargetMBeans

ObjectName[] getInjectionTargetMBeans()
ObjectNames that are targeted for injection by this loader. MBean attributes of such targets that are both readable and writable are saved and restored by this loader. This loader does not, however, control the lifecycle of these targets.

Supported API: true


getLoadedObjectNames

ObjectName[] getLoadedObjectNames()
Known ObjectNames of MBeans currently loaded by this loader

Supported API: true


getLoadedObjectNames

ObjectName[] getLoadedObjectNames(String classname)
                                  throws ClassNotFoundException
Known ObjectNames of MBeans currently loaded by this loader that implement or extend the specified class

Supported API: true

Parameters:
classname - Name of class which MBeans must implement or extend to be represented in the results
Throws:
ClassNotFoundException

reload

void reload()
            throws IOException
Reload MBeans from configuration file

Supported API: true

Throws:
IOException

save

void save()
          throws IOException,
                 URISyntaxException
Save MBean configuration to file

Supported API: true

Throws:
IOException
URISyntaxException

saveAs

void saveAs(String mbeanConfigFileRef)
            throws IOException,
                   URISyntaxException
Save MBean configuration to a different file than that currently used and reset MBeanConfigFileRef to this new file

Supported API: true

Parameters:
mbeanConfigFileRef - Reference (URL, file path, or resource path) of file to which MBeans will be saved
Throws:
IOException
URISyntaxException

saveACopyAs

void saveACopyAs(String mbeanConfigFileRef)
                 throws IOException,
                        URISyntaxException
Save MBean configuration to a different file than that currently used (but leave MBeanConfigFileRef unchanged)

Supported API: true

Parameters:
mbeanConfigFileRef - Reference (URL, file path, or resource path) of file to which MBeans will be saved
Throws:
IOException
URISyntaxException

addObject

void addObject(String classname)
               throws Exception
Instantiate an object of the specified classname and add it to the set of objects controlled (and saved) by this loader.

Requires that the given class have a public, no-arg constructor.

Supported API: true

Parameters:
classname - Name of class to instantiation
Throws:
Exception

addObject

void addObject(String classname,
               String constructorStringArgument)
               throws Exception
Instantiate an object of the specified classname and add it to the set of objects controlled (and saved) by this loader.

Requires that the given class have a public contructor which takes a string as its only argument.

This operation is provided primarily for MBeans that require a String to uniquely register different instances of themselves. Other MBean attributes should be set on the MBean itself after it has been successfully added (rather than requiring additional variations of the addObject operation).

Supported API: true

Parameters:
classname - Name of class to instantiation
constructorStringArgument - Single string to be passed to the class constructor
Throws:
Exception

addSubloader

void addSubloader(String name)
                  throws OperationsException,
                         NullPointerException
Instantiate a loader with the given name and add it to the set of objects controlled (and saved) by this loader

Supported API: true

Parameters:
name - Name to give new loader (must be unique amongst loaders directly managed by this loader)
Throws:
OperationsException
NullPointerException

addAndNameMBean

void addAndNameMBean(String classname,
                     String relativeObjectName)
                     throws Exception
Instantiate an MBean and register it under an ObjectName relative to this loader's BaseObjectName.

Supported API: true

Parameters:
classname - Name of class to instantiation
relativeObjectName - String to extend BaseObjectName by to obtain an ObjectName for the new MBean
Throws:
Exception

removeObject

boolean removeObject(ObjectName objectName)
Remove the object with the given object name from the set of objects controlled by this loader but do not destroy the object

Supported API: true

Parameters:
objectName - ObjectName of object to remove from control of this loader

removeObject

boolean removeObject(ObjectName objectName,
                     boolean destroy)
Remove the object with the given object name from the set of objects controlled by this loader

Supported API: true

Parameters:
objectName - ObjectName of object to remove from control of this loader
destroy - Whether the object should also be destroyed

addInjectionTargetMBean

void addInjectionTargetMBean(ObjectName objectName)
Add an ObjectName to this loader's set of injection targets

Supported API: true

Parameters:
objectName - ObjectName to add to this loader's set of injection targets

removeInjectionTargetMBean

void removeInjectionTargetMBean(ObjectName objectName)
Remove an ObjectName from this loader's set of injection targets

Supported API: true

Parameters:
objectName - ObjectName to remove from this loader's set of injection targets

start

void start()
Initialize this loader (normally only used internally)

Supported API: true


stop

void stop()
Stop this loader (normally only used internally)

Supported API: true


viewMBeanConfigFile

String[] viewMBeanConfigFile()
                             throws IOException
View the MBean config file

Supported API: true

Throws:
IOException

emailMBeanConfigFile

void emailMBeanConfigFile(String addressesOrEmailList,
                          String subject)
                          throws IOException
E-mail the raw MBean config file

Supported API: true

Parameters:
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
Throws:
IOException

emailMBeanConfigFile

void emailMBeanConfigFile(String addressesOrEmailList,
                          String subject,
                          String xslt,
                          boolean applyXslt)
                          throws IOException,
                                 SAXException,
                                 ParserConfigurationException
E-mail the styled MBean config file

Supported API: true

Parameters:
addressesOrEmailList - Comma-delimited list of e-mail addresses or name of e-mail list to send e-mail to
subject - Subject to give e-mail
xslt - Reference (URL, file, or resource) to XSLT stylesheet to apply
applyXslt - Whether to apply XSLT or just insert a processing instruction for it
Throws:
IOException
SAXException
ParserConfigurationException