Class ScriptedRunnable
- java.lang.Object
-
- net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
-
- net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
-
- net.shibboleth.utilities.java.support.scripting.ScriptedRunnable
-
- All Implemented Interfaces:
Runnable,Component,DestructableComponent,IdentifiableComponent,IdentifiedComponent,InitializableComponent,UnmodifiableComponent
public class ScriptedRunnable extends AbstractIdentifiableInitializableComponent implements Runnable, UnmodifiableComponent
A Runnable which executes a script.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private classScriptedRunnable.RunnableScriptEvaluatorThe thing that runs the script.
-
Field Summary
Fields Modifier and Type Field Description private ObjectcustomObjectCustom object for script.private org.slf4j.LoggerlogThe log.private EvaluableScriptscriptWhat is run.private ScriptedRunnable.RunnableScriptEvaluatorscriptEvaluatorEvaluator.
-
Constructor Summary
Constructors Constructor Description ScriptedRunnable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoInitialize()This method checks to ensure that the component ID is not null.ObjectgetCustomObject()Return the custom (externally provided) object.EvaluableScriptgetScript()Gets the script to be evaluated.voidrun()voidsetCustomObject(Object object)Set the custom (externally provided) object.voidsetScript(EvaluableScript matcherScript)Sets the script to be evaluated.-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiableInitializableComponent
setId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractIdentifiedInitializableComponent
getId
-
Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent
destroy, doDestroy, initialize, isDestroyed, isInitialized
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.shibboleth.utilities.java.support.component.IdentifiedComponent
getId
-
-
-
-
Field Detail
-
script
@NonnullAfterInit private EvaluableScript script
What is run.
-
scriptEvaluator
@NonnullAfterInit private ScriptedRunnable.RunnableScriptEvaluator scriptEvaluator
Evaluator.
-
log
@Nonnull private final org.slf4j.Logger log
The log.
-
customObject
@Nullable private Object customObject
Custom object for script.
-
-
Method Detail
-
doInitialize
protected void doInitialize() throws ComponentInitializationExceptionThis method checks to ensure that the component ID is not null. Performs the initialization of the component. This method is executed within the lock on the object being initialized. The default implementation of this method is a no-op.- Overrides:
doInitializein classAbstractIdentifiedInitializableComponent- Throws:
ComponentInitializationException- thrown if there is a problem initializing the component
-
getCustomObject
@Nullable public Object getCustomObject()
Return the custom (externally provided) object.- Returns:
- the custom object
-
setCustomObject
public void setCustomObject(@Nullable Object object)Set the custom (externally provided) object.- Parameters:
object- the custom object
-
getScript
@NonnullAfterInit public EvaluableScript getScript()
Gets the script to be evaluated.- Returns:
- the script to be evaluated
-
setScript
public void setScript(@Nonnull EvaluableScript matcherScript)Sets the script to be evaluated.- Parameters:
matcherScript- the script to be evaluated
-
-