|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IRuntimeContext
This interface represents runtime context. Runtime context is a media in which a module runs. Components use runtime context to exchange information.
Runtime context can be treated as a set of attributes. Components can store attributes in the context and read attributes from it. Each context attribute has name and value. Attribute name uniquely identifies the attribute in the context.
Context can have one parent context thus forming context hierarchy.
In the context hierarchy attributes can be defined with different
visibility scope. Attributes defined in the local scope
are visible in the current context and child context hierarchy
of the current context only. If attribute with the same name is defined
in the parent context hierarchy then the parent attribute is not visible
in the current context and child context hierarchy: the parent attribute is shadowed
by the local attribute defined in the current context.
Attributes defined in the global scope are visible to the entire
context hierarchy unless shadowed by local attributes.
Root context, the top of the context hierarchy,
can be created with runtime factory (IRuntimeFactory.createContext()).
IRuntimeFactory| Method Summary | |
|---|---|
IRuntimeContext |
createContext()
Creates a child context for this context |
java.lang.Object |
getAttribute(java.lang.String name)
Retrieves an attribute with the given name from this context |
java.lang.String |
getDefaultAttributeName()
Returns a default attribute name. |
java.lang.String |
getErrorAttributeName()
Returns a default error attribute name. |
void |
setAttribute(java.lang.String name,
java.lang.Object value,
AttributeScope scope)
Stores an attribute with the given name, value and scope in this context |
| Method Detail |
|---|
void setAttribute(java.lang.String name,
java.lang.Object value,
AttributeScope scope)
throws BareflowException
name - attribute namevalue - attribute valuescope - attribute scope
BareflowException - if attribute cannot be set
java.lang.Object getAttribute(java.lang.String name)
throws BareflowException
name - attirubte name
BareflowException - if attribute cannot be retrievedjava.lang.String getDefaultAttributeName()
java.lang.String getErrorAttributeName()
IRuntimeContext createContext()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||