context.arch.subscriber
Class Callbacks

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--context.arch.subscriber.Callbacks

public class Callbacks
extends java.util.Vector

This class is a container for a group of callbacks. Callbacks can be added, removed, and found in the container.

See Also:
Serialized Form

Field Summary
static java.lang.String CALLBACKS
          Tag for a widget's callbacks
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Callbacks()
          Empty constructor
Callbacks(DataObject data)
          Constructor that takes a DataObject as a parameter.
 
Method Summary
 void addCallback(Callback callback)
          Adds the given Callback object to the container.
 void addCallback(java.lang.String name, Attributes attributes)
          Adds the given callback name and attributes to the container.
 void addCallbacks(Callbacks callbacks)
          Adds the given Callbacks object to the container.
 Callback getCallback(java.lang.String name)
          This method returns the Callback with the given name from this list of Callbacks.
 Callback getCallbackAt(int index)
          Returns the Callback object at the given index
 boolean hasCallback(Callback callback)
          Determines whether the given Callback object is in the container
 boolean hasCallback(java.lang.String name)
          Determines whether a callback with the given name is in the container
 boolean hasCallback(java.lang.String name, Attributes attributes)
          Determines whether the given callback name and attributes are in the container.
 int indexOfCallback(Callback callback)
          Returns the index at which the Callback object occurs
 int indexOfCallback(java.lang.String name, Attributes attributes)
          Returns the index at which the given callback name and attributes occurs
 int numCallbacks()
          Returns the number of Callbacks in the container return the number of Callbacks in the container
 java.lang.String toAString()
          A printable version of this class.
 DataObject toDataObject()
          Converts to a DataObject.
 
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
 

Field Detail

CALLBACKS

public static final java.lang.String CALLBACKS
Tag for a widget's callbacks
Constructor Detail

Callbacks

public Callbacks()
Empty constructor

Callbacks

public Callbacks(DataObject data)
Constructor that takes a DataObject as a parameter. The DataObject must contain the tag . It stores the encoded data.
Parameters:
data - DataObject that contains the callback info
Method Detail

toDataObject

public DataObject toDataObject()
Converts to a DataObject.
Returns:
Callbacks object converted to an DataObject

addCallback

public void addCallback(Callback callback)
Adds the given Callback object to the container.
Parameters:
callback - Callback to add

addCallback

public void addCallback(java.lang.String name,
                        Attributes attributes)
Adds the given callback name and attributes to the container.
Parameters:
name - Name of the callback to add
attributes - Attributes of the callback being added

addCallbacks

public void addCallbacks(Callbacks callbacks)
Adds the given Callbacks object to the container.
Parameters:
callbacks - Callbacks to add

getCallbackAt

public Callback getCallbackAt(int index)
Returns the Callback object at the given index
Parameters:
index - Index into the container
Returns:
Callback at the specified index

hasCallback

public boolean hasCallback(Callback callback)
Determines whether the given Callback object is in the container
Parameters:
call - Callback to check
Returns:
whether Callback is in the container

hasCallback

public boolean hasCallback(java.lang.String name,
                           Attributes attributes)
Determines whether the given callback name and attributes are in the container.
Parameters:
name - Name of the callback to check
attributes - Attributes of the callback to check
Returns:
whether the given callback name and attributes are in the container

hasCallback

public boolean hasCallback(java.lang.String name)
Determines whether a callback with the given name is in the container
Parameters:
name - Name of the callback to look for
Returns:
whether a callback with the given name is in the container

indexOfCallback

public int indexOfCallback(Callback callback)
Returns the index at which the Callback object occurs
Parameters:
callback - Callback to look for
Returns:
index of the specified Callback

indexOfCallback

public int indexOfCallback(java.lang.String name,
                           Attributes attributes)
Returns the index at which the given callback name and attributes occurs
Parameters:
name - Name of the callback to look for
attributes - Attributes of the callback to look for

numCallbacks

public int numCallbacks()
Returns the number of Callbacks in the container return the number of Callbacks in the container

getCallback

public Callback getCallback(java.lang.String name)
This method returns the Callback with the given name from this list of Callbacks.
Parameters:
name - of the Callback to return
Returns:
Callback with the given name

toAString

public java.lang.String toAString()
A printable version of this class.
Returns:
String version of this class