org.sakaiproject.service.framework.component.cover
Class ComponentManager

java.lang.Object
  extended byorg.sakaiproject.service.framework.component.cover.ComponentManager

public class ComponentManager
extends Object

ComponentManager is a static Cover for the Component Manager; see that interface for usage details.

This cover is special. As a cover for the component manager, it cannot use the component manager to find the instance. Instead, this is where a static single-instance singleton ComponentManger of a particular type is created.

Version:
$Revision: 632 $
Author:
University of Michigan, Sakai Software Development Team

Field Summary
static boolean CACHE_MESSAGE_SERVICES
           
static boolean CACHE_SINGLETONS
          Whether the static Cover classes should cache the singleton they operate on.
static int LIFESTYLE_MANY
           
static int LIFESTYLE_SINGLE
           
static int LIFESTYLE_UNKNOWN
           
 
Constructor Summary
ComponentManager()
           
 
Method Summary
static boolean contains(Class iface)
           
static boolean contains(String ifaceName)
           
static Object get(Class iface)
           
static Object get(String ifaceName)
           
static ComponentManager getInstance()
          Access the component manager of the single instance.
static int getLifestyle(Class iface)
           
static Set getLocalRegisteredInterfaces()
           
static Set getRegisteredInterfaces()
           
static boolean isReady()
           
static void loadComponent(Class iface, Object component)
           
static void loadComponent(String ifaceName, Object component)
           
static void loadXmlFile(String filename)
           
static void loadXmlStream(InputStream stream)
           
static ComponentManager nestComponentManager()
           
static void setReady(boolean ready)
           
static void unload()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CACHE_SINGLETONS

public static final boolean CACHE_SINGLETONS
Whether the static Cover classes should cache the singleton they operate on. If false, every call to a Cover class will result in a get() on the ComponentManager (inefficient!!) THIS SHOULD BE SET TO TRUE FOR THE PRODUCTION ENVIRONMENT!

See Also:
Constant Field Values

CACHE_MESSAGE_SERVICES

public static final boolean CACHE_MESSAGE_SERVICES
See Also:
Constant Field Values

LIFESTYLE_UNKNOWN

public static final int LIFESTYLE_UNKNOWN
See Also:
Constant Field Values

LIFESTYLE_SINGLE

public static final int LIFESTYLE_SINGLE
See Also:
Constant Field Values

LIFESTYLE_MANY

public static final int LIFESTYLE_MANY
See Also:
Constant Field Values
Constructor Detail

ComponentManager

public ComponentManager()
Method Detail

getInstance

public static ComponentManager getInstance()
Access the component manager of the single instance.

Returns:
The ComponentManager.

get

public static Object get(Class iface)

get

public static Object get(String ifaceName)

contains

public static boolean contains(Class iface)

contains

public static boolean contains(String ifaceName)

getLifestyle

public static int getLifestyle(Class iface)

getRegisteredInterfaces

public static Set getRegisteredInterfaces()

getLocalRegisteredInterfaces

public static Set getLocalRegisteredInterfaces()

unload

public static void unload()

loadXmlFile

public static void loadXmlFile(String filename)

loadXmlStream

public static void loadXmlStream(InputStream stream)

loadComponent

public static void loadComponent(Class iface,
                                 Object component)

loadComponent

public static void loadComponent(String ifaceName,
                                 Object component)

nestComponentManager

public static ComponentManager nestComponentManager()

isReady

public static boolean isReady()

setReady

public static void setReady(boolean ready)