Package wt.jmx.core.mbeans
Interface ScriptActionDelegateFactoryMBean
- All Superinterfaces:
SelfEmailingMBean
- All Known Subinterfaces:
NotificationScriptActionMBean,SummaryScriptActionMBean
- All Known Implementing Classes:
NotificationScriptAction,SummaryScriptAction
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
Supported API: true
Extendable: false
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddScriptFileRef(String scriptFileRef) Add a script file to the list of those referenced
Supported API: truevoidaddScriptFileRef(String scriptFileRef, int index) Add a script file to the list of those referenced at the specified index
Supported API: truevoidassignScript(String script) Assign new string to Script attribute; NOTE: the UI control used by some JMX consoles here will unfortunately filter out line separators
Supported API: truevoidRemove all script file references
Supported API: trueAll available compatible scripting engines
Supported API: trueintInterval between checks for updates to any referenced script files
Supported API: trueString[]Script string represented as an array of strings for readability in common JMX consoles
Supported API: trueShort name of scripting engine to use; must be javax.script compatible and implement javax.script.Invocable
Supported API: trueException associated with evaluating Script attribute
Supported API: trueInformation on script files currently referenced
Supported API: truevoidrefresh()Checks for updates to any referenced script files; if any have been updated, the script is re-evaluated
Supported API: truevoidremoveScriptFileRef(int index) Remove the script file reference at the specified index
Supported API: truevoidsetRefreshIntervalSeconds(int refreshIntervalSeconds) Interval between checks for updates to any referenced script files
Supported API: truevoidsetScriptEngineShortName(String scriptEngineShortName) Short name of scripting engine to use; must be javax.script compatible and implement javax.script.Invocable
Supported API: truevoidsetScriptFileRef(String scriptFileRef, int index) Change the script file reference at the specified index
Supported API: trueMethods inherited from interface wt.jmx.core.mbeans.SelfEmailingMBean
emailThisMBean
-
Method Details
-
getAvailableScriptEngines
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
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
Exception associated with evaluating Script attribute
Supported API: true- Throws:
OpenDataException
-
getScriptFileRefs
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
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
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
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 addindex- Index at which to insert the new reference- Throws:
Exception
-
setScriptFileRef
Change the script file reference at the specified index
Supported API: true- Parameters:
scriptFileRef- New script URL, file, or resource referenceindex- Index of file reference to change- Throws:
Exception
-
removeScriptFileRef
Remove the script file reference at the specified index
Supported API: true- Parameters:
index- Index of file reference to remove
-
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:
IOExceptionScriptException
-