Package net.shibboleth.shared.scripting
Class 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 classThe thing that runs the script. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ObjectCustom object for script.private final org.slf4j.LoggerThe log.private EvaluableScriptWhat is run.Evaluator. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidThis method checks to ensure that the component ID is not null.Return the custom (externally provided) object.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.shared.component.AbstractIdentifiableInitializableComponent
setIdMethods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentExceptionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.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:
doInitializein 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
-
run
public void run()
-