context.arch.widget
Class WidgetHandles

java.lang.Object
  extended byjava.util.AbstractCollection
      extended byjava.util.AbstractList
          extended byjava.util.Vector
              extended bycontext.arch.widget.WidgetHandles
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class WidgetHandles
extends java.util.Vector

This class maintains a list of widget handles, allows additions, removals and updates to individual handles.

See Also:
WidgetHandle, Serialized Form

Field Summary
protected  java.util.Hashtable hash
           
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
WidgetHandles()
          Basic empty constructor
 
Method Summary
 void addWidgetHandle(java.lang.String id, java.lang.String hostname, int port)
          Adds a widgethandle to the widgethandle list
 void addWidgetHandle(WidgetHandle handle)
          Adds a widgethandle to the widgethandle list
 void addWidgetHandles(WidgetHandles handles)
          Adds a set of widgethandles to the widgethandle list
 WidgetHandle getWidgetHandleAt(int index)
          Returns the WidgetHandle at the given index.
 int numWidgetHandles()
          Returns the number of widgetHandles in the list
 
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

Field Detail

hash

protected java.util.Hashtable hash
Constructor Detail

WidgetHandles

public WidgetHandles()
Basic empty constructor

Method Detail

addWidgetHandle

public void addWidgetHandle(java.lang.String id,
                            java.lang.String hostname,
                            int port)
Adds a widgethandle to the widgethandle list

Parameters:
id - ID of the widget being subscribed to
hostname - Name of the widget's host computer
port - Port number of the widget

addWidgetHandle

public void addWidgetHandle(WidgetHandle handle)
Adds a widgethandle to the widgethandle list

Parameters:
handle - WidgetHandle to add

addWidgetHandles

public void addWidgetHandles(WidgetHandles handles)
Adds a set of widgethandles to the widgethandle list

Parameters:
handles - WidgetHandles to add to the list

getWidgetHandleAt

public WidgetHandle getWidgetHandleAt(int index)
Returns the WidgetHandle at the given index. Do not assume that a given WidgetHandle's index will stay constant throughout its lifetime. When other WidgetHandles are added and removed, a given widgetHandle's index may change.

Parameters:
index - index value of the WidgetHandle object to retrieve

numWidgetHandles

public int numWidgetHandles()
Returns the number of widgetHandles in the list