org.sape.carbon.core.component
Class Lookup

java.lang.Object
  |
  +--org.sape.carbon.core.component.Lookup

public class Lookup
extends Object

This class provides a singleton interface to the component subsystem. This class should be used by any client that needs a reference to a component

Copyright 2002 Sapient

Since:
carbon 1.0
Version:
$Revision: 1.13 $($Author: dvoet $ / $Date: 2003/05/05 21:21:11 $)
Author:
Douglas Voet, January 2002

Field Summary
private  ComponentKeeper componentKeeper
          Reference to the component keeper.
private static Lookup INSTANCE
          Single statically instantiated instance of lookup.
 
Constructor Summary
private Lookup()
          Private constructor to ensure singleton.
 
Method Summary
 Component fetchComponent(String logicalComponentName)
          Fetches a reference to a component.
 ComponentKeeper getComponentKeeper()
          Gets the ComponentKeeper for the system.
static Lookup getInstance()
           Static factory method for getting a reference to the singleton Lookup.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

componentKeeper

private ComponentKeeper componentKeeper
Reference to the component keeper.


INSTANCE

private static final Lookup INSTANCE
Single statically instantiated instance of lookup.

Constructor Detail

Lookup

private Lookup()
Private constructor to ensure singleton.

Method Detail

fetchComponent

public Component fetchComponent(String logicalComponentName)

Fetches a reference to a component. Delegates to the system's ComponentKeeper. If the ComponentKeeper has not been created yet, it calls the BootStrapper to get it.

Parameters:
logicalComponentName - the name of the component
Returns:
a reference to the component specified by name

getComponentKeeper

public ComponentKeeper getComponentKeeper()
Gets the ComponentKeeper for the system.

Returns:
the ComponentKeeper

getInstance

public static Lookup getInstance()

Static factory method for getting a reference to the singleton Lookup.

Returns:
Lookup


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.