Jumpi v1.2.0

org.jumpi.spi.boot
Class JumpiFactory

java.lang.Object
  |
  +--org.jumpi.spi.boot.JumpiFactory
All Implemented Interfaces:
JumpiFactory

public class JumpiFactory
extends java.lang.Object
implements JumpiFactory

A JumpiFactory instance to bootstrap any Jumpi implementation. The reference implementation is attempted to be instantiated in the absense of properties with a 'org.jumpi.configurationloader' property.

Pass a 'org.jumpi.configurationloader' property to inform the JumpiFactory which ConfigurationLoader class to use to load the configuration. It is the ConfigurationLoader which tells the JumpiFactory which class is to be used for the Jumpi instance. Any parameters passed to the getJumpi method are passed on to the ConfigurationLoader to customize loading of parameters or the parameters themselves.


Field Summary
static java.lang.String PROPERTY_KEY_PREFIX
          The prefix to all jumpi property keys.
 
Constructor Summary
JumpiFactory()
           
 
Method Summary
 Jumpi getJumpi()
          Get an instance of the Jumpi reference implementation.
 Jumpi getJumpi(java.util.Hashtable parameters)
           Get a Jumpi instance using a ConfigurationLoader named in the 'org.jumpi.configurationloader' property to configure the instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_KEY_PREFIX

public static final java.lang.String PROPERTY_KEY_PREFIX
The prefix to all jumpi property keys. Value: org.jumpi.

See Also:
Constant Field Values
Constructor Detail

JumpiFactory

public JumpiFactory()
Method Detail

getJumpi

public Jumpi getJumpi()
               throws java.lang.Exception
Get an instance of the Jumpi reference implementation. The Jumpi reference implementations are loaded via org.jumpi.impl.ConfigurationLoader which has separate implementations for J2SE and MIDP platforms.

Specified by:
getJumpi in interface JumpiFactory
Returns:
an instance of the Jumpi reference implementation.
Throws:
java.lang.Exception - when any failure condition occurs.
See Also:
JumpiFactory.getJumpi(Hashtable)

getJumpi

public Jumpi getJumpi(java.util.Hashtable parameters)
               throws java.lang.Exception

Get a Jumpi instance using a ConfigurationLoader named in the 'org.jumpi.configurationloader' property to configure the instance. The ConfigurationLoader provides the classname of the Jumpi instance.

The parameters are passed to the ConfigurationLoader to customize the configuration loading or parameters. See ConfigurationLoader.getConfiguration(java.util.Hashtable).

Specified by:
getJumpi in interface JumpiFactory
Parameters:
parameters - read-only configuration parameters for the JumpiFactory and ConfigurationLoader named in the 'org.jumpi.configurationloader' property.
Returns:
a fully configured, not started Jumpi instance.
Throws:
java.lang.Exception - when any error condition occurs.

Jumpi v1.2.0

Copyright 2003, Peter Jonathan Klauser.