link
Avalon
Context Descriptors
Home PlanetProductsCentral
Entry Descriptor
Description

The entry element declares the criteria for the inclusion of a context entry within a context object. The entry exposes a context key and the type that the context entry may be safely cast to.

Attributes
AttributeRequiredDescription
keyyes The key that the component implementation will use when retrieving a value from the supplied context using the context.get( key ) operation.
typeno The classname of the context entry. The default value is java.lang.String.
optionalno The optional status of the entry. If optional is TRUE, a container is not required to supply the entry. The default value is FALSE.
aliasno An alternative name that a component may use to locate an entry. This is convinient when dealing with legacy applications.
volatileno A 'true' or 'false' value that determines if a entry value may be cached by a container or if the value must be recomputed on each access. The default value is 'false' resulting in cached behaviour. Volotile entries are useful for contitions such as incremental key generation, time value lookup, etc.
Example XML
<context>
  <entry key="home" type="java.io.File"/>
  <entry key="test" type="MySpecialClass" optional="TRUE"/>
  <entry key="timestamp" type="java.util.Data" volatile="TRUE"/>
</context>