|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Each Component part of the Jumpi reference implementation is configurable and hence implements the Configurable interface. Components are structured as a unidirectionaly linked tree. Each parent knows its children, but a child does not know its parent ( at least for configuration purposes ). The root of the tree is a Jumpi instance.
Each Component has a fully qualified name which is set by the Component's
parent Component with the configure(java.lang.String, org.jumpi.spi.Properties)
method. The fully qualified
name of a component is guaranteed to be unique throughout the Component
tree and forms the basis for advanced management, see Operation.MANAGE
. In the Jumpi reference implementation, fully qualified
names are guaranteed to be unique by constructing the childs' names from
the fully qualified name of the Component with a unqiue suffix for each
child Component.
The configure() method is used to configure the instance and delegate the
configuration to any Components to which it is a parent. Configuration data
is provided in the Properties
collection. Each Component looks up
its configuration parameters by suffixing a propertyname suffix to its
fully qualified name.
For example, a parent Component has two children named 'child1' and 'child2' the fully qualified name of the parent is 'parent'. Each child wants to lookup a property-suffix called '.suffix'.
Method Summary | |
void |
configure(java.lang.String name,
Properties props)
Configure the instance given the properties provided. |
java.lang.String |
getName()
Get the fully qualified name of the instance. |
Method Detail |
public void configure(java.lang.String name, Properties props) throws java.lang.Exception
Configure the instance given the properties provided. The properties for the instance are those which are prefixed with the fully qualified name of the instance. The properties may not be altered during the course of configuration.
The fully qualified name of the instance must be unique over all configurable instances of a single root Jumpi instance. This is not guaranteed to be unique within a single VM nor globally.
name
- the fully qualified instance name.props
- the read-only properties to configure the instance with.
java.lang.Exception
- when configuration is unsuccessful.
java.lang.IllegalArgumentException
- if name or props is null or invalid
parameters.public java.lang.String getName()
configure(java.lang.String, org.jumpi.spi.Properties)
|
Jumpi v1.2.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |