org.nees.data.util.bootstrap
Class Bootstrapper

java.lang.Object
  extended byorg.nees.data.util.bootstrap.Bootstrapper
All Implemented Interfaces:
InitializationObjectInterface
Direct Known Subclasses:
AuthenticIdentityBootstrapper

public abstract class Bootstrapper
extends java.lang.Object
implements InitializationObjectInterface


Field Summary
static java.lang.String CLASS_SUFFIX
           
protected static int ICI_OBJECT_INDEX
           
protected static int INIT_OBJECT_INDEX
           
static java.lang.String INIT_OBJECT_SUFFIX
           
 
Constructor Summary
protected Bootstrapper()
           
protected Bootstrapper(java.util.Properties properties)
          Creates a new instance of NFMSBootstrapper
 
Method Summary
protected  void bootstrap()
           
protected  void bootstrap(java.util.Properties p)
           
protected  boolean checkClassInterfaces(java.lang.Class targetInterface, java.lang.Class classToCheck)
          This will take a class and check each of its interfaces to see if one is the same as the targetInterface.
protected  java.lang.Object[][] createInitObjects(java.util.Vector objectKeyList)
          This creates the init objects for the given list that is returned by createNewInstance()
protected  java.util.Vector createNewInstances()
          This fills up the instance table with blank instances and returns a vector or strings giving the names of the keys in the properties to be used.
protected  java.lang.Object getClassForInterface(java.lang.Class interfaceName)
          Searches the classes for some instance of this interface.
protected  InitializationObjectInterface getInitObject(java.lang.Class className)
           
protected  java.util.HashMap getInstanceTable()
           
 org.apache.log4j.Logger getLogger()
           
protected  java.lang.Object getNewInstance(java.lang.String className)
           
protected  java.util.Properties getProperties()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_SUFFIX

public static java.lang.String CLASS_SUFFIX

INIT_OBJECT_SUFFIX

public static java.lang.String INIT_OBJECT_SUFFIX

INIT_OBJECT_INDEX

protected static int INIT_OBJECT_INDEX

ICI_OBJECT_INDEX

protected static int ICI_OBJECT_INDEX
Constructor Detail

Bootstrapper

protected Bootstrapper(java.util.Properties properties)
                throws InstantiationContractException
Creates a new instance of NFMSBootstrapper


Bootstrapper

protected Bootstrapper()
                throws InstantiationContractException
Method Detail

getInstanceTable

protected java.util.HashMap getInstanceTable()

bootstrap

protected void bootstrap(java.util.Properties p)
                  throws InstantiationContractException
Throws:
InstantiationContractException

createNewInstances

protected java.util.Vector createNewInstances()
                                       throws InstantiationContractException
This fills up the instance table with blank instances and returns a vector or strings giving the names of the keys in the properties to be used. So for instance, if there is a key my.object.class, the resulting entry in the vector is my.object and this allows the system to later search for the corresponding key os my.object.initObject.

Throws:
InstantiationContractException

createInitObjects

protected java.lang.Object[][] createInitObjects(java.util.Vector objectKeyList)
                                          throws InstantiationContractException
This creates the init objects for the given list that is returned by createNewInstance()

Throws:
InstantiationContractException

bootstrap

protected void bootstrap()
                  throws InstantiationContractException
Throws:
InstantiationContractException

getInitObject

protected InitializationObjectInterface getInitObject(java.lang.Class className)
                                               throws InstantiationContractException
Throws:
InstantiationContractException

getClassForInterface

protected java.lang.Object getClassForInterface(java.lang.Class interfaceName)
                                         throws InstantiationContractException
Searches the classes for some instance of this interface. This is not picky and will return the first possible instance it finds or null if there is no such instance.

Throws:
InstantiationContractException

checkClassInterfaces

protected boolean checkClassInterfaces(java.lang.Class targetInterface,
                                       java.lang.Class classToCheck)
This will take a class and check each of its interfaces to see if one is the same as the targetInterface.


getProperties

protected java.util.Properties getProperties()

getNewInstance

protected java.lang.Object getNewInstance(java.lang.String className)
                                   throws InstantiationContractException
Throws:
InstantiationContractException

getLogger

public org.apache.log4j.Logger getLogger()