|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.UCL.satin.arch.components.Component edu.UCL.satin.arch.components.Reflective edu.UCL.satin.arch.components.container.Container edu.UCL.satin.impl.container.Core
The CORE is a container that uses a hashtable to store all components.
Field Summary | |
private Registrar |
defaultRegistrar
|
private java.util.Vector |
listeners
|
private java.util.Hashtable |
repo
|
Fields inherited from class edu.UCL.satin.arch.components.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 | |
Core()
|
Method Summary | |
short |
acceptLMU(LMU lmu)
Allows the Reflective component to inspect a given LMU and receive parts of it |
void |
addListener(ComponentListener c)
Adds a listener that will be notified when any new component is discovered. |
void |
addListener(ComponentListener c,
java.util.Hashtable filter)
Adds a listener that will be notified when any new component matching the filter given is discovered. |
Component |
getComponent(java.lang.Object id)
Returns a component found with the given ID attribute |
Component[] |
getComponents(java.util.Hashtable properties)
Returns an array of Components found that match the given property set |
Registrar |
getDefaultRegistrar()
Returns the default registrar of the container |
boolean |
isEnabled()
Checks whether this component is enabled or not. |
void |
removeListener(ComponentListener c)
Removes all instances of the given listener (including any different filters) from the list of listeners to be notified. |
void |
removeListener(ComponentListener c,
java.util.Hashtable filter)
Removes the particular listener+filter pair from the list of listeners to be notified. |
void |
setDefaultRegistrar(Registrar registrar)
Sets the default registrar of the container |
void |
setEnabled(boolean enabled)
Enables or disables the component |
private static boolean |
subset(java.util.Hashtable a,
java.util.Hashtable b)
Returns true if a is a subset of b |
Methods inherited from class edu.UCL.satin.arch.components.container.Container |
getContainer |
Methods inherited from class edu.UCL.satin.arch.components.Component |
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute, match, 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.ComponentFacet |
addAttribute, construct, destroy, getAttribute, getProperties, hasAttribute |
Field Detail |
private java.util.Hashtable repo
private Registrar defaultRegistrar
private java.util.Vector listeners
Constructor Detail |
public Core()
Method Detail |
public void setDefaultRegistrar(Registrar registrar)
Container
setDefaultRegistrar
in interface ContainerFacet
setDefaultRegistrar
in class Container
registrar
- public Registrar getDefaultRegistrar()
Container
getDefaultRegistrar
in interface ContainerFacet
getDefaultRegistrar
in class Container
public void addListener(ComponentListener c)
DiscoveryFacet
addListener
in interface DiscoveryFacet
c
- the listener that will be notifiedpublic void addListener(ComponentListener c, java.util.Hashtable filter)
DiscoveryFacet
addListener
in interface DiscoveryFacet
c
- the listener to be notifiedfilter
- The filter, as a hashtable of attributespublic void removeListener(ComponentListener c)
DiscoveryFacet
removeListener
in interface DiscoveryFacet
c
- The listener to be removed.public void removeListener(ComponentListener c, java.util.Hashtable filter)
DiscoveryFacet
removeListener
in interface DiscoveryFacet
c
- The listener to be removedfilter
- The filter matches of which this listener will not be notified any more.public Component getComponent(java.lang.Object id)
Container
getComponent
in class Container
public Component[] getComponents(java.util.Hashtable properties)
DiscoveryFacet
getComponents
in interface DiscoveryFacet
properties
- The properties that the returned components need to match
private static boolean subset(java.util.Hashtable a, java.util.Hashtable b)
public boolean isEnabled()
ComponentFacet
isEnabled
in interface ComponentFacet
isEnabled
in class Component
public void setEnabled(boolean enabled)
ComponentFacet
setEnabled
in interface ComponentFacet
setEnabled
in class Component
enabled
- public short acceptLMU(LMU lmu)
Reflective
acceptLMU
in class Reflective
lmu
- received which is targetted at this component
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |