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 ClassesModifier and TypeClassDescriptionprivate class
The thing that runs the script. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Object
Custom object for script.private final org.slf4j.Logger
The log.private EvaluableScript
What is run.Evaluator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
This method checks to ensure that the component ID is not null.Return the custom (externally provided) object.Gets the script to be evaluated.void
run()
void
setCustomObject
(Object object) Set the custom (externally provided) object.void
setScript
(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 Details
-
script
What is run. -
scriptEvaluator
Evaluator. -
log
@Nonnull private final org.slf4j.Logger logThe log. -
customObject
Custom object for script.
-
-
Constructor Details
-
ScriptedRunnable
public ScriptedRunnable()
-
-
Method Details
-
doInitialize
This 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:
doInitialize
in classAbstractIdentifiedInitializableComponent
- Throws:
ComponentInitializationException
- thrown if there is a problem initializing the component
-
getCustomObject
Return the custom (externally provided) object.- Returns:
- the custom object
-
setCustomObject
Set the custom (externally provided) object.- Parameters:
object
- the custom object
-
getScript
Gets the script to be evaluated.- Returns:
- the script to be evaluated
-
setScript
Sets the script to be evaluated.- Parameters:
matcherScript
- the script to be evaluated
-
run
public void run()
-