edu.UCL.satin.arch.components.container
Class Container

java.lang.Object
  extended byedu.UCL.satin.arch.components.Component
      extended byedu.UCL.satin.arch.components.Reflective
          extended byedu.UCL.satin.arch.components.container.Container
All Implemented Interfaces:
ComponentFacet, ContainerFacet, Facet
Direct Known Subclasses:
Core

public abstract class Container
extends Reflective
implements ContainerFacet

Represents the SATIN container, which hosts all components in the system.

Author:
Stefanos Zachariadis

Field Summary
private static Container container
           
 
Fields inherited from class edu.UCL.satin.arch.components.Reflective
ACCEPT, FAIL, HANDLER_INSTANTIATION, PARTIAL_ACCEPT, REJECT
 
Fields inherited from class edu.UCL.satin.arch.components.Component
immutable, properties
 
Fields inherited from interface edu.UCL.satin.arch.facets.ComponentFacet
DISABLED, ENABLED
 
Constructor Summary
Container(java.lang.Object id)
          Creates a new container with the given component identifier
 
Method Summary
abstract  Component getComponent(java.lang.Object id)
          Returns a component found with the given ID attribute
static Container getContainer()
          Returns an instance of the Container for this node
abstract  Registrar getDefaultRegistrar()
          Returns the default registrar of the container
abstract  void setDefaultRegistrar(Registrar registrar)
          Sets the default registrar of the container
 
Methods inherited from class edu.UCL.satin.arch.components.Reflective
acceptLMU
 
Methods inherited from class edu.UCL.satin.arch.components.Component
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute, isEnabled, match, setEnabled, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.UCL.satin.arch.facets.ContainerFacet
addListener, addListener, getComponents, removeListener, removeListener
 
Methods inherited from interface edu.UCL.satin.arch.facets.ComponentFacet
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute, isEnabled, setEnabled
 

Field Detail

container

private static Container container
Constructor Detail

Container

public Container(java.lang.Object id)
Creates a new container with the given component identifier

Parameters:
id - the identifier of the component
Method Detail

setDefaultRegistrar

public abstract void setDefaultRegistrar(Registrar registrar)
Sets the default registrar of the container

Specified by:
setDefaultRegistrar in interface ContainerFacet
Parameters:
registrar -

getDefaultRegistrar

public abstract Registrar getDefaultRegistrar()
Returns the default registrar of the container

Specified by:
getDefaultRegistrar in interface ContainerFacet
Returns:
Returns the default registrar of the container

getComponent

public abstract Component getComponent(java.lang.Object id)
Returns a component found with the given ID attribute

Returns:
The latest version of the component found, or null if the component does not exist

getContainer

public static Container getContainer()
Returns an instance of the Container for this node

Returns:
An instance of the container for this node