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

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Notification type produced when this MBean finishes a load operation

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

    Supported API: true
    static final String
    Notification type produced when this MBean finishes a save operation

    Supported API: true
    static final String
    Notification type produced when this MBean starts a save operation

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

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

    Supported API: true
    static final String
    Notification type produced when this MBean finishes a unload operation (i.e.
    static final String
    Notification type produced when this MBean starts a unload operation (i.e.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addAndNameMBean(String classname, String relativeObjectName)
    Instantiate an MBean and register it under an ObjectName relative to this loader's BaseObjectName.
    void
    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
    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
    Object name under which loaded (non-loader) objects will be located; null indicates that the default Windchill domain

    Supported API: true
    ObjectNames that are targeted for injection by this loader.
    Known ObjectNames of MBeans currently loaded by this loader

    Supported API: true
    Known ObjectNames of MBeans currently loaded by this loader that implement or extend the specified class

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

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

    Supported API: true
    URL from which MBeans will be loaded

    Supported API: true
    Name of loader

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

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

    Supported API: true
    Time MBean was last started; null if stopping or not started

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

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

    Supported API: true
    boolean
    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 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
    sendMBeanConfigFileToSupport(long callNumber, String description)
    Send the raw MBean config file to support

    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
    Initialize this loader (normally only used internally)

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

    Supported API: true
    View the MBean config file

    Supported API: true

    Methods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean

    emailThisMBean
  • Field Details

    • 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
    • SAVE_STARTED_NOTIF_TYPE

      static final String SAVE_STARTED_NOTIF_TYPE
      Notification type produced when this MBean starts a save operation

      Supported API: true
    • SAVE_FINISHED_NOTIF_TYPE

      static final String 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

      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

      @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

      @MBeanOperationImpact(1) void reload() throws IOException
      Reload MBeans from configuration file

      Supported API: true
      Throws:
      IOException
    • save

      Save MBean configuration to file

      Supported API: true
      Throws:
      IOException
      URISyntaxException
    • 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:
      IOException
      URISyntaxException
    • 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:
      IOException
      URISyntaxException
    • addObject

      @MBeanOperationImpact(1) 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

      @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 instantiation
      constructorStringArgument - Single string to be passed to the class constructor
      Throws:
      Exception
    • addSubloader

      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

      @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 instantiation
      relativeObjectName - String to extend BaseObjectName by to obtain an ObjectName for the new MBean
      Throws:
      Exception
    • removeObject

      @MBeanOperationImpact(1) 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

      @MBeanOperationImpact(1) 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

      @MBeanOperationImpact(1) 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

      @MBeanOperationImpact(1) 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

      @MBeanOperationImpact(1) void start()
      Initialize this loader (normally only used internally)

      Supported API: true
    • stop

      @MBeanOperationImpact(1) void stop()
      Stop this loader (normally only used internally)

      Supported API: true
    • viewMBeanConfigFile

      @MBeanOperationImpact(0) String[] viewMBeanConfigFile() throws IOException
      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 to
      subject - 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 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
    • 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 with
      description - Description to give data
      Throws:
      Exception