Package wt.jmx.core.mbeans
Interface MBeanLoaderMBean
- All Superinterfaces:
SelfEmailingMBean
- All Known Implementing Classes:
MBeanLoader
Provides persistence (load/store ability) for a set of JMX management beans
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNotification type produced when this MBean finishes a load operation
Supported API: truestatic final StringNotification type produced when this MBean starts a load operation
Supported API: truestatic final StringNotification type produced when this MBean finishes a save operation
Supported API: truestatic final StringNotification type produced when this MBean starts a save operation
Supported API: truestatic final StringNotification type produced when this MBean is started
Supported API: truestatic final StringNotification type produced when this MBean is stopped
Supported API: truestatic final StringNotification type produced when this MBean finishes a unload operation (i.e.static final StringNotification type produced when this MBean starts a unload operation (i.e. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAndNameMBean(String classname, String relativeObjectName) Instantiate an MBean and register it under an ObjectName relative to this loader's BaseObjectName.voidaddInjectionTargetMBean(ObjectName objectName) Add an ObjectName to this loader's set of injection targets
Supported API: truevoidInstantiate an object of the specified classname and add it to the set of objects controlled (and saved) by this loader.voidInstantiate an object of the specified classname and add it to the set of objects controlled (and saved) by this loader.voidaddSubloader(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: truevoidemailMBeanConfigFile(String addressesOrEmailList, String subject) E-mail the raw MBean config file
Supported API: truevoidemailMBeanConfigFile(String addressesOrEmailList, String subject, String xslt, boolean applyXslt) E-mail the styled MBean config file
Supported API: trueObject name under which loaded (non-loader) objects will be located; null indicates that the default Windchill domain
Supported API: trueObjectNames that are targeted for injection by this loader.Known ObjectNames of MBeans currently loaded by this loader
Supported API: truegetLoadedObjectNames(String classname) Known ObjectNames of MBeans currently loaded by this loader that implement or extend the specified class
Supported API: trueintInterval (in seconds) at which MBeanConfigFileRef will be checked for updates; disabled if non-positive
Supported API: trueReference (URL, file path, or resource path) of file from which MBeans will be loaded
Supported API: trueURL from which MBeans will be loaded
Supported API: truegetName()Name of loader
Supported API: trueintNumber of objects currently loaded by this loader
Supported API: trueTime MBean configuration completed loading; null during reload()
Supported API: trueTime MBean was last started; null if stopping or not started
Supported API: truebooleanWhether this MBean is currently started, i.e.voidreload()Reload MBeans from configuration file
Supported API: truevoidremoveInjectionTargetMBean(ObjectName objectName) Remove an ObjectName from this loader's set of injection targets
Supported API: truebooleanremoveObject(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: truebooleanremoveObject(ObjectName objectName, boolean destroy) Remove the object with the given object name from the set of objects controlled by this loader
Supported API: truevoidsave()Save MBean configuration to file
Supported API: truevoidsaveACopyAs(String mbeanConfigFileRef) Save MBean configuration to a different file than that currently used (but leave MBeanConfigFileRef unchanged)
Supported API: truevoidSave MBean configuration to a different file than that currently used and reset MBeanConfigFileRef to this new file
Supported API: truevoidsendMBeanConfigFileToSupport(long callNumber, String description) Send the raw MBean config file to support
Supported API: truevoidsetMBeanConfigFileCheckInterval(int mbeanConfigFileCheckIntervalInSeconds) Interval (in seconds) at which MBeanConfigFileRef will be checked for updates; disabled if non-positive
Supported API: truevoidsetMBeanConfigFileRef(String mbeanConfigFileRef) Reference (URL, file path, or resource path) of file from which MBeans will be loaded
Supported API: truevoidstart()Initialize this loader (normally only used internally)
Supported API: truevoidstop()Stop this loader (normally only used internally)
Supported API: trueString[]View the MBean config file
Supported API: trueMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Field Details
-
START_NOTIF_TYPE
Notification type produced when this MBean is started
Supported API: true -
STOP_NOTIF_TYPE
Notification type produced when this MBean is stopped
Supported API: true -
LOAD_STARTED_NOTIF_TYPE
Notification type produced when this MBean starts a load operation
Supported API: true -
LOAD_FINISHED_NOTIF_TYPE
Notification type produced when this MBean finishes a load operation
Supported API: true -
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
Notification type produced when this MBean finishes a unload operation (i.e. the first stage of reload())
Supported API: true -
SAVE_STARTED_NOTIF_TYPE
Notification type produced when this MBean starts a save operation
Supported API: true -
SAVE_FINISHED_NOTIF_TYPE
Notification type produced when this MBean finishes a save operation
Supported API: true
-
-
Method Details
-
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
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
@MBeanOperationImpact(0) 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
Reload MBeans from configuration file
Supported API: true- Throws:
IOException
-
save
Save MBean configuration to file
Supported API: true- Throws:
IOExceptionURISyntaxException
-
saveAs
@MBeanOperationImpact(1) 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:
IOExceptionURISyntaxException
-
saveACopyAs
@MBeanOperationImpact(1) 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:
IOExceptionURISyntaxException
-
addObject
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
@MBeanOperationImpact(1) 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 instantiationconstructorStringArgument- Single string to be passed to the class constructor- Throws:
Exception
-
addSubloader
@MBeanOperationImpact(1) 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:
OperationsExceptionNullPointerException
-
addAndNameMBean
@MBeanOperationImpact(1) 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 instantiationrelativeObjectName- String to extend BaseObjectName by to obtain an ObjectName for the new MBean- Throws:
Exception
-
removeObject
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
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 loaderdestroy- Whether the object should also be destroyed
-
addInjectionTargetMBean
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
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
Initialize this loader (normally only used internally)
Supported API: true -
stop
Stop this loader (normally only used internally)
Supported API: true -
viewMBeanConfigFile
View the MBean config file
Supported API: true- Throws:
IOException
-
emailMBeanConfigFile
@MBeanOperationImpact(0) 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 tosubject- Subject to give e-mail- Throws:
IOException
-
emailMBeanConfigFile
@MBeanOperationImpact(0) 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 tosubject- Subject to give e-mailxslt- Reference (URL, file, or resource) to XSLT stylesheet to applyapplyXslt- Whether to apply XSLT or just insert a processing instruction for it- Throws:
IOExceptionSAXExceptionParserConfigurationException
-
sendMBeanConfigFileToSupport
@MBeanOperationImpact(0) void sendMBeanConfigFileToSupport(long callNumber, String description) throws Exception Send the raw MBean config file to support
Supported API: true- Parameters:
callNumber- Existing technical support call number to associate this data withdescription- Description to give data- Throws:
Exception
-