Interface ScriptActionDelegateFactoryMBean

All Superinterfaces:
SelfEmailingMBean
All Known Subinterfaces:
NotificationScriptActionMBean, SummaryScriptActionMBean
All Known Implementing Classes:
NotificationScriptAction, SummaryScriptAction

public interface ScriptActionDelegateFactoryMBean extends SelfEmailingMBean
InfoDelegateFactory that calls a specified script before and after logging and/or e-mailing the parent Summary or NotificationHandler MBean would normally perform. The script can be specified by a text string(via the Script attribute) and/or by one or more files. The files are evaluated first (and in order) followed by the string, if one is specified.

Supported API: true

Extendable: false
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addScriptFileRef(String scriptFileRef)
    Add a script file to the list of those referenced

    Supported API: true
    void
    addScriptFileRef(String scriptFileRef, int index)
    Add a script file to the list of those referenced at the specified index

    Supported API: true
    void
    Assign new string to Script attribute; NOTE: the UI control used by some JMX consoles here will unfortunately filter out line separators

    Supported API: true
    void
    Remove all script file references

    Supported API: true
    All available compatible scripting engines

    Supported API: true
    int
    Interval between checks for updates to any referenced script files

    Supported API: true
    Script string represented as an array of strings for readability in common JMX consoles

    Supported API: true
    Short name of scripting engine to use; must be javax.script compatible and implement javax.script.Invocable

    Supported API: true
    Exception associated with evaluating Script attribute

    Supported API: true
    Information on script files currently referenced

    Supported API: true
    void
    Checks for updates to any referenced script files; if any have been updated, the script is re-evaluated

    Supported API: true
    void
    Remove the script file reference at the specified index

    Supported API: true
    void
    setRefreshIntervalSeconds(int refreshIntervalSeconds)
    Interval between checks for updates to any referenced script files

    Supported API: true
    void
    setScriptEngineShortName(String scriptEngineShortName)
    Short name of scripting engine to use; must be javax.script compatible and implement javax.script.Invocable

    Supported API: true
    void
    setScriptFileRef(String scriptFileRef, int index)
    Change the script file reference at the specified index

    Supported API: true

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

    emailThisMBean
  • Method Details

    • getAvailableScriptEngines

      CompositeData[] getAvailableScriptEngines() throws OpenDataException
      All available compatible scripting engines

      Supported API: true
      Throws:
      OpenDataException
    • getScriptEngineShortName

      String getScriptEngineShortName()
      Short name of scripting engine to use; must be javax.script compatible and implement javax.script.Invocable

      Supported API: true
    • setScriptEngineShortName

      void setScriptEngineShortName(String scriptEngineShortName)
      Short name of scripting engine to use; must be javax.script compatible and implement javax.script.Invocable

      Supported API: true
    • getScript

      String[] getScript()
      Script string represented as an array of strings for readability in common JMX consoles

      Supported API: true
    • getScriptException

      CompositeData getScriptException() throws OpenDataException
      Exception associated with evaluating Script attribute

      Supported API: true
      Throws:
      OpenDataException
    • getScriptFileRefs

      CompositeData[] getScriptFileRefs() throws OpenDataException
      Information on script files currently referenced

      Supported API: true
      Throws:
      OpenDataException
    • getRefreshIntervalSeconds

      int getRefreshIntervalSeconds()
      Interval between checks for updates to any referenced script files

      Supported API: true
    • setRefreshIntervalSeconds

      void setRefreshIntervalSeconds(int refreshIntervalSeconds)
      Interval between checks for updates to any referenced script files

      Supported API: true
    • assignScript

      @MBeanOperationImpact(1) void assignScript(String script) throws ScriptException
      Assign new string to Script attribute; NOTE: the UI control used by some JMX consoles here will unfortunately filter out line separators

      Supported API: true
      Parameters:
      script - Text of script to assign Script attribute to
      Throws:
      ScriptException
    • addScriptFileRef

      @MBeanOperationImpact(1) void addScriptFileRef(String scriptFileRef) throws Exception
      Add a script file to the list of those referenced

      Supported API: true
      Parameters:
      scriptFileRef - URL, file, or resource reference of script to add
      Throws:
      Exception
    • addScriptFileRef

      @MBeanOperationImpact(1) void addScriptFileRef(String scriptFileRef, int index) throws Exception
      Add a script file to the list of those referenced at the specified index

      Supported API: true
      Parameters:
      scriptFileRef - URL, file, or resource reference of script to add
      index - Index at which to insert the new reference
      Throws:
      Exception
    • setScriptFileRef

      @MBeanOperationImpact(1) void setScriptFileRef(String scriptFileRef, int index) throws Exception
      Change the script file reference at the specified index

      Supported API: true
      Parameters:
      scriptFileRef - New script URL, file, or resource reference
      index - Index of file reference to change
      Throws:
      Exception
    • removeScriptFileRef

      @MBeanOperationImpact(1) void removeScriptFileRef(int index)
      Remove the script file reference at the specified index

      Supported API: true
      Parameters:
      index - Index of file reference to remove
    • clearScriptFileRefs

      @MBeanOperationImpact(1) void clearScriptFileRefs()
      Remove all script file references

      Supported API: true
    • refresh

      Checks for updates to any referenced script files; if any have been updated, the script is re-evaluated

      Supported API: true
      Throws:
      IOException
      ScriptException