|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.util.AbstractCollection
java.util.AbstractList
java.util.Vector
context.arch.subscriber.Subscribers
This class maintains a list of subscribers, allows additions, removals and updates to individual subscribers. Agathe: I have changed Subscribers and Subscriber to allow the addition of the DiscovererSubscriber class. Subscriber and DiscovererSubscriber implement an interface handled by Subscribers. Agathe: modify restart subscription
Subscriber,
Serialized Form| Field Summary | |
static boolean |
DEBUG
Debug flag |
static java.lang.String |
SUBSCRIBERS
Tag used in messages |
| Fields inherited from class java.util.Vector |
capacityIncrement, elementCount, elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Subscribers(MessageHandler mh,
java.lang.String id)
Basic constructor that takes an object that implements the MessageHandler interface and an id to create a logfile name from. |
|
| Method Summary | |
void |
addSubscriber(AbstractSubscriber sub)
Adds a subscriber to the subscriber list |
void |
addSubscriber(AbstractSubscriber sub,
boolean log)
Adds a subscriber to the subscriber list |
AbstractSubscriber |
getSubscriber(java.lang.String subscriptionId)
Returns the subscriber with the given name. |
Subscriber |
getSubscriber(Subscriber subscriber)
This method returns if possible the subscriber that corresponds to the arguments. |
AbstractSubscriber |
getSubscriberAt(int index)
Returns the subscriber at the given index. |
java.util.Enumeration |
getSubscriberNames()
Returns an enumeration containing all the subscriber names in the list |
java.util.Enumeration |
getSubscribers()
Returns an enumeration containing all the subscribers in the list |
static void |
main(java.lang.String[] arg)
|
int |
numSubscribers()
Returns the number of subscribers in the list |
boolean |
remove(AbstractSubscriber subToRemove)
Remove an AbstractSubscriber |
boolean |
removeSubscriber(AbstractSubscriber sub)
Removes a subscriber from the subscriber list |
boolean |
removeSubscriber(AbstractSubscriber sub,
boolean log)
Removes a subscriber from the subscriber list |
boolean |
removeSubscriber(java.lang.String subId)
Removes a subscriber from the subscriber list |
boolean |
removeSubscriber(java.lang.String subId,
boolean log)
Removes a subscriber from the subscriber list |
void |
setBaseObjectId(java.lang.String id)
Set the BaseObject id used to attribute the unique id for subscribers |
DataObject |
toDataObject()
Converts to a DataObject. |
void |
updateSubscriber(AbstractSubscriber sub)
Updates a subscriber in the subscriber list. |
void |
updateSubscriber(AbstractSubscriber sub,
boolean log)
Updates a subscriber in the subscriber 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 |
public static boolean DEBUG
public static final java.lang.String SUBSCRIBERS
| Constructor Detail |
public Subscribers(MessageHandler mh,
java.lang.String id)
| Method Detail |
public void addSubscriber(AbstractSubscriber sub)
sub - Subscriber object to add
public void addSubscriber(AbstractSubscriber sub,
boolean log)
sub - Subscriber object to addlog - Whether to log the subscribe or notpublic boolean removeSubscriber(AbstractSubscriber sub)
sub - Subscriber object to remove
public boolean removeSubscriber(AbstractSubscriber sub,
boolean log)
sub - Subscriber object to removelog - Whether to log the subscribe or not
public boolean remove(AbstractSubscriber subToRemove)
subToRemove - public boolean removeSubscriber(java.lang.String subId)
public boolean removeSubscriber(java.lang.String subId,
boolean log)
log - Whether to log the subscribe or not
public void updateSubscriber(AbstractSubscriber sub)
sub - Subscriber object to update
public void updateSubscriber(AbstractSubscriber sub,
boolean log)
sub - Subscriber object to updatelog - Whether to log the subscribe or notpublic AbstractSubscriber getSubscriberAt(int index)
index - index value of the Subscriber object to retrievepublic AbstractSubscriber getSubscriber(java.lang.String subscriptionId)
subscriptionId - ID of the Subscriber object to retrievepublic Subscriber getSubscriber(Subscriber subscriber)
public java.util.Enumeration getSubscribers()
public java.util.Enumeration getSubscriberNames()
public int numSubscribers()
public DataObject toDataObject()
public void setBaseObjectId(java.lang.String id)
id - public static void main(java.lang.String[] arg)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||