org.formulacompiler.runtime
Interface Engine

All Known Subinterfaces:
SaveableEngine

public interface Engine

API to a computation engine. You normally use a EngineBuilder to build one from a given spreadsheet file, or else instantiate one constructed earlier from persistent storage using FormulaRuntime.loadEngine(java.io.InputStream), without requiring access to the original spreadsheet file. An engine manages a computation factory, from which you instantiate individual computations.

This interface is an API only. Do not implement it yourself.

Author:
peo
See Also:
EngineBuilder, getComputationFactory()

Method Summary
 ComputationFactory getComputationFactory()
          Returns the factory for computations implemented by this engine.
 ComputationFactory getComputationFactory(Computation.Config _cfg)
          Returns a factory with explicit computation environment configuration for computations implemented by this engine.
 

Method Detail

getComputationFactory

ComputationFactory getComputationFactory()
Returns the factory for computations implemented by this engine.

Returns:
The generated factory. Besides AFC's own factory interface, the returned factory also implements your own factory interface, if you specified one (which is recommended). So you can simply cast the returned factory to your own interface.

getComputationFactory

ComputationFactory getComputationFactory(Computation.Config _cfg)
Returns a factory with explicit computation environment configuration for computations implemented by this engine.

Parameters:
_cfg - is configuration for the execution environment for the computations produced by the returned factory.
Returns:
The generated factory. Besides AFC's own factory interface, the returned factory also implements your own factory interface, if you specified one (which is recommended). So you can simply cast the returned factory to your own interface.