Jumpi v1.2.0

org.jumpi.spi
Interface ConfigurationLoader

All Known Implementing Classes:
AbstractConfigurationLoader

public interface ConfigurationLoader

A ConfigurationLoader instance is responsible for loading properties into a Properties instance to configure Jumpi instances, and telling the JumpiFactory which class to load for the Jumpi instance.

The ConfigurationLoader may read properties from a properties file, XML file, MIDLET application properties, download over a network, provide fixed hard-coded values or any other mechanism.

Configuration in the Jumpi reference implementation takes place only during the JumpiFactory.getJumpi(Hashtable) method.

See Also:
Configurable.configure(java.lang.String, org.jumpi.spi.Properties)

Method Summary
 Properties getConfiguration(java.util.Hashtable parameters)
          Get a complete set of configuration properties for a Jumpi instance.
 java.lang.String getJumpiClassname(java.util.Hashtable parameters)
          Get the classname of the Jumpi instance.
 

Method Detail

getConfiguration

public Properties getConfiguration(java.util.Hashtable parameters)
                            throws java.lang.Exception
Get a complete set of configuration properties for a Jumpi instance. The read-only parameters passed to the method are identical to those given to the JumpiFactory.getJumpi(Hashtable) method. They can be used to customize the configuration loading or the configuration parameters themselves.

Parameters:
parameters - read-only customization parameters.
Returns:
a complete set of Jumpi configuration properties.
Throws:
java.lang.Exception - for any failure condition.

getJumpiClassname

public java.lang.String getJumpiClassname(java.util.Hashtable parameters)
                                   throws java.lang.Exception
Get the classname of the Jumpi instance. Used by JumpiFactory.getJumpi to instantiate a Jumpi instance which can be different dependent on configuration.

Parameters:
parameters - read-only customization parameters.
Returns:
the classname of the Jumpi instance.
Throws:
java.lang.Exception - when any error condition occurs.
See Also:
JumpiFactory.getJumpi(Hashtable)

Jumpi v1.2.0

Copyright © 2003, Peter Jonathan Klauser.