edu.UCL.satin.impl.MiToolkitDeployer
Class HashLMU

java.lang.Object
  extended byedu.UCL.satin.impl.MiToolkitDeployer.HashLMU
All Implemented Interfaces:
LMU, java.io.Serializable

public class HashLMU
extends java.lang.Object
implements LMU

HashLMU denotes an LMU that uses hashtables to store its contents.

Author:
Stefanos Zachariadis
See Also:
Serialized Form

Field Summary
private  java.util.Hashtable classes
           
private  java.util.Hashtable components
           
private  java.util.Hashtable data
           
private  Handler handler
           
private  java.util.Hashtable objects
           
private  java.util.Hashtable properties
           
 
Constructor Summary
HashLMU(java.lang.String TARG, java.lang.String LTARG)
          Creates a new LMU
 
Method Summary
 void addAttribute(GenericAttribute attr)
          Adds an attribute to the lmu
 void addClass(java.lang.Class c)
          Adds a class to the current lmu.
 void addComponent(Component c)
          Adds a new component to the LMU
 void addData(java.lang.Object d)
          Adds data to the lmu
 void addHandler(Handler h)
          Adds a Handler to the lmu
 void addObject(java.lang.Object o)
          Adds an Object to the current lmu.
 GenericAttribute getAttribute(java.lang.Object key)
          Returns an attribute from the lmu
 java.util.Enumeration getClasses()
          Returns the classes stored in this lmu
 java.util.Enumeration getComponents()
          Returns the components stored in this lmu.
 java.util.Enumeration getData()
          Returns the data stored in this lmu
 Handler getHandler()
          Returns the Handler for this lmu
 java.util.Enumeration getObjects()
          Returns the objects stored in this lmu
 java.util.Enumeration getProperties()
          Returns the properties of this lmu
 boolean hasAttribute(java.lang.Object key)
          Checks whether the LMU has an attribute with the given key
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private java.util.Hashtable data

components

private java.util.Hashtable components

classes

private java.util.Hashtable classes

objects

private java.util.Hashtable objects

properties

private java.util.Hashtable properties

handler

private Handler handler
Constructor Detail

HashLMU

public HashLMU(java.lang.String TARG,
               java.lang.String LTARG)
Creates a new LMU

Parameters:
TARG - the target ip address/port of the Deployer
LTARG - the ID of the reflective component that this LMU is specifically targetted at
Method Detail

addComponent

public void addComponent(Component c)
Description copied from interface: LMU
Adds a new component to the LMU

Specified by:
addComponent in interface LMU
Parameters:
c - The component to add

addClass

public void addClass(java.lang.Class c)
Description copied from interface: LMU
Adds a class to the current lmu.

Specified by:
addClass in interface LMU
Parameters:
c - The class to add.

addObject

public void addObject(java.lang.Object o)
Description copied from interface: LMU
Adds an Object to the current lmu.

Specified by:
addObject in interface LMU
Parameters:
o - The object to add.

addData

public void addData(java.lang.Object d)
Description copied from interface: LMU
Adds data to the lmu

Specified by:
addData in interface LMU
Parameters:
d - the data to add

addHandler

public void addHandler(Handler h)
Description copied from interface: LMU
Adds a Handler to the lmu

Specified by:
addHandler in interface LMU
Parameters:
h - the Handler to add

addAttribute

public void addAttribute(GenericAttribute attr)
Description copied from interface: LMU
Adds an attribute to the lmu

Specified by:
addAttribute in interface LMU
Parameters:
attr - The attribute to add

getAttribute

public GenericAttribute getAttribute(java.lang.Object key)
Description copied from interface: LMU
Returns an attribute from the lmu

Specified by:
getAttribute in interface LMU
Parameters:
key - the key of the attribute
Returns:
the attribute that maps to the given key

getProperties

public java.util.Enumeration getProperties()
Description copied from interface: LMU
Returns the properties of this lmu

Specified by:
getProperties in interface LMU
Returns:
The properties of this lmu

getHandler

public Handler getHandler()
Description copied from interface: LMU
Returns the Handler for this lmu

Specified by:
getHandler in interface LMU
Returns:
the Handler, if it exists or null otherwise

getObjects

public java.util.Enumeration getObjects()
Description copied from interface: LMU
Returns the objects stored in this lmu

Specified by:
getObjects in interface LMU
Returns:
the objects stored in this lmu as an enumeration

getClasses

public java.util.Enumeration getClasses()
Description copied from interface: LMU
Returns the classes stored in this lmu

Specified by:
getClasses in interface LMU
Returns:
the classes stored in this lmu as an enumeration

getData

public java.util.Enumeration getData()
Description copied from interface: LMU
Returns the data stored in this lmu

Specified by:
getData in interface LMU
Returns:
the data stored in this lmu as an enumeration

getComponents

public java.util.Enumeration getComponents()
Description copied from interface: LMU
Returns the components stored in this lmu.

Specified by:
getComponents in interface LMU
Returns:
the components stored in this lmu

hasAttribute

public boolean hasAttribute(java.lang.Object key)
Description copied from interface: LMU
Checks whether the LMU has an attribute with the given key

Specified by:
hasAttribute in interface LMU
Parameters:
key - The attribute key
Returns:
true if an attribute with the given key exists or false otherwise