Skip navigation links

Class ScriptExecutorFactory

  extended by org.identityconnectors.common.script.ScriptExecutorFactory

public abstract class ScriptExecutorFactory
extends java.lang.Object

Abstraction for finding script executors to allow us to invoke scripts from java.

NOTE: This is intended purely for executing java-embedable scripting languages. That is, the execution model is assumed to be same-JVM, so scripts can have side effects on objects passed to the script. This is used internally by the connector framework in its implementation of ScriptOnConnectorApiOp and should be used by connectors should they need to have a custom implementation of ScriptOnConnectorOp. This is not intended for use by connectors that implement ScriptOnResourceOp.

Constructor Summary


Method Summary
abstract  java.lang.String getLanguageName()
          Returns the name of the language supported by this factory.
static java.util.Set<java.lang.String> getSupportedLanguages()
          Returns the set of supported languages.
static ScriptExecutorFactory newInstance(java.lang.String language)
          Creates a ScriptExecutorFactory for the given language
abstract  ScriptExecutor newScriptExecutor(java.lang.ClassLoader loader, java.lang.String script, boolean compile)
          Creates a script executor for the given script.


Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait


Constructor Detail


public ScriptExecutorFactory()

Method Detail


public static java.util.Set<java.lang.String> getSupportedLanguages()
Returns the set of supported languages.
The set of supported languages.


public static ScriptExecutorFactory newInstance(java.lang.String language)
                                         throws java.lang.IllegalArgumentException
Creates a ScriptExecutorFactory for the given language
language - The name of the language
The script executor factory
java.lang.IllegalArgumentException - If the given language is not supported.


public abstract ScriptExecutor newScriptExecutor(java.lang.ClassLoader loader,
                                                 java.lang.String script,
                                                 boolean compile)
Creates a script executor for the given script.
loader - The classloader that contains the java classes that the script should have access to.
script - The script text.
compile - A hint to tell the script executor whether or not to compile the given script. This need not be implemented by all script executors. If true, the caller is saying that they intend to call the script multiple times with different arguments, so compile if possible.
A script executor.


public abstract java.lang.String getLanguageName()
Returns the name of the language supported by this factory.
the name of the language.

Skip navigation links

Copyright © 2013, Oracle and/or its affiliates. All rights reserved.