|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||
See:
Description
| Interface Summary | |
|---|---|
| IBuilderContext | |
| IComponentBuilder | An interface to build a component from a model object. |
| IComponentRegistry | This interface represents a registry of all the components for a module. |
| ICondition | This interface represents condition that can be evaluated in a runtime context. |
| IExpression | This interface represents an expression that can be evaluated during runtime in the given runtime context. |
| IExtensionFactory | This interface is used to instantiate Extension. |
| IModule | This interface represents a module. |
| IProvider | Provider supplies data for downstream processing. |
| IRuntime | Interface to run task in the given context. |
| IRuntimeContext | This interface represents runtime context. |
| IRuntimeContextIterator | An iterator over a collection of runtime contexts. |
| IRuntimeFactory | Defines a factory API to create the following essential runtime objects:
runtime
runtime context
runtime value
expression
script
Each runtime is identified by its own id (see IRuntimeFactory.getRuntimeId()). |
| IRuntimeValue | This interface represents a value object that can be evaluated only at runtime and in a runtime context. |
| IScript | |
| ITask | An interface for task components. |
| Class Summary | |
|---|---|
| Extension | |
| ModuleFactory | Defines a factory to create module instances. |
| Runtime | This class provides default implementation for the IRuntime interface. |
| Enum Summary | |
|---|---|
| AttributeScope | Enumeration of runtime context scopes. |
| Exception Summary | |
|---|---|
| BareflowException | |
| Annotation Types Summary | |
|---|---|
| Builder | An annotation to be used by component model object to specify builder class name |
Core Bareflow framework classes. This package can be used to create custom components, component builders, custom runtime implementations, embed the framework into applications.
Example:
ModuleFactory factory = ModuleFactory.newInstance();
IModule module = factory.createModule(inputStream);
IRuntimeFactory runtimeFactory = module.getRuntimeFactory();
IRuntimeContext ctx = runtimeFactory.createContext();
ctx.setAttribute("myAttribute", 1234, AttributeScope.GLOBAL);
module.run(ctx);
Object result = ctx.getAttribute("myAttribute");
Example:
ModuleFactory moduleFactory = ModuleFactory.newInstance();
final IModule module = moduleFactory.createModule(inputStream);
final IRuntimeFactory runtimeFactory = module.getRuntimeFactory();
class MyThread extends Thread{
private int value;
MyThread(int value) {
this.value = value;
}
public void run() {
try {
IRuntimeContext ctx = runtimeFactory.createContext();
ctx.setAttribute("myAttribute", value, AttributeScope.GLOBAL);
module.run(ctx);
Object result = ctx.getAttribute("myAttribute");
System.out.println(result);
} catch (BareflowException e) {
e.printStackTrace();
}
}
};
new MyThread(1).start();
new MyThread(2).start();
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES | |||||||||