Package org.intocps.maestro.interpreter
Interface IExternalValueFactory
-
- All Known Implementing Classes:
DefaultExternalValueFactory
public interface IExternalValueFactoryThis class provides run-time support only. It creates and destroys certain types based on load and unload
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IExternalValueFactorychangeWorkingDirectory(Path newSuggestion, InputStream config)Requests the current factory to return a new instance with the working directory changedcom.spencerwi.either.Either<Exception,Value>create(String loaderName, List<Value> args)Creates a new interpreter value for the specified type using the supplied argumentsValuedestroy(Value value)Destruction of values created by the factory.booleansupports(String type)Check if a certain type is supported by the external value factory
-
-
-
Method Detail
-
supports
boolean supports(String type) throws Exception
Check if a certain type is supported by the external value factory- Parameters:
type-- Returns:
- true if the type is supported by
create(String, List) - Throws:
Exception
-
create
com.spencerwi.either.Either<Exception,Value> create(String loaderName, List<Value> args)
Creates a new interpreter value for the specified type using the supplied arguments- Parameters:
loaderName- the type to createargs- the arguments used to create the value- Returns:
- the value or an exception if creation fails
-
destroy
Value destroy(Value value) throws InterpreterException
Destruction of values created by the factory. Destruction must make sure all resources hold by this value is freed- Parameters:
value- the value to destroy- Returns:
- void return
- Throws:
InterpreterException- any destruction error description
-
changeWorkingDirectory
IExternalValueFactory changeWorkingDirectory(Path newSuggestion, InputStream config) throws Exception
Requests the current factory to return a new instance with the working directory changed- Parameters:
newSuggestion- a suggested path for a new directoryconfig- optionally a new config can be null- Returns:
- a new factory which operates from the suggested path
- Throws:
Exception
-
-