|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<AbstractDistributionRequest>
com.tenduke.distribution.DistributionRequests
public class DistributionRequests
Class wrapping a list of AbstractDistributionRequest objects that should be handled as an entity.
| Field Summary |
|---|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Constructor Summary | |
|---|---|
DistributionRequests()
|
|
| Method Summary | |
|---|---|
boolean |
add(AbstractDistributionRequest element)
Subscribes to distribution request events and appends the specified request object to the end of this list. |
void |
add(int index,
AbstractDistributionRequest element)
Subscribes to distribution request events and inserts the specified request object at the specified position in this list. |
boolean |
addAll(java.util.Collection<? extends AbstractDistributionRequest> collection)
Appends all of the requests in the specified collection to the end of this list, in the order that they are returned by the specified collection's Iterator. |
boolean |
addAll(int index,
java.util.Collection<? extends AbstractDistributionRequest> collection)
Inserts all of the requests in the specified collection into this list, starting at the specified position. |
protected void |
finalize()
Un-subscribes from all distribution request events. |
void |
handleDistributionRequestResult(DistributionRequestResult result)
Handle result of a single DistributionRequest wrapped by this object. |
void |
notifySubscribers(DistributionRequestsResult results)
Notify all DistributionRequests results subscribers. |
AbstractDistributionRequest |
remove(int index)
Un-subscribes distribution request events and removes the request object at the specified position in this list. |
boolean |
remove(java.lang.Object request)
Un-subscribes distribution request events and removes the first occurrence of the specified request object from this list, if it is present. |
boolean |
removeAll(java.util.Collection<?> collection)
Un-subscribes distribution request events and removes all of this collection's request objects that are also contained in the specified collection. |
protected void |
removeRange(int fromIndex,
int toIndex)
Un-subscribes distribution request events and removes from this list all of the request objects whose index is between fromIndex, inclusive, and toIndex, exclusive. |
boolean |
retainAll(java.util.Collection<?> collection)
Un-subscribes distribution request events and retains only the request objects in this collection that are contained in the specified collection (optional operation). |
void |
subscribeResults(DistributionRequestResultsSubscriber subscriber)
Add an object as DistributionRequest result subscriber. |
void |
unsubscribeResults(DistributionRequestResultsSubscriber subscriber)
Remove a DistributionRequest result subscriber. |
| Methods inherited from class java.util.ArrayList |
|---|
clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, iterator, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, toString |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, iterator, listIterator, listIterator, subList |
| Constructor Detail |
|---|
public DistributionRequests()
| Method Detail |
|---|
public boolean add(AbstractDistributionRequest element)
add in interface java.util.Collection<AbstractDistributionRequest>add in interface java.util.List<AbstractDistributionRequest>add in class java.util.ArrayList<AbstractDistributionRequest>element - Request to add.
public void add(int index,
AbstractDistributionRequest element)
add in interface java.util.List<AbstractDistributionRequest>add in class java.util.ArrayList<AbstractDistributionRequest>index - The index at which the new request object should be added to.element - Request to add.public boolean addAll(java.util.Collection<? extends AbstractDistributionRequest> collection)
addAll in interface java.util.Collection<AbstractDistributionRequest>addAll in interface java.util.List<AbstractDistributionRequest>addAll in class java.util.ArrayList<AbstractDistributionRequest>collection - Collection containing requests to be added to this list.
public boolean addAll(int index,
java.util.Collection<? extends AbstractDistributionRequest> collection)
addAll in interface java.util.List<AbstractDistributionRequest>addAll in class java.util.ArrayList<AbstractDistributionRequest>index - Index at which to insert the first request object from the specified collection.collection - Collection containing requests to be added to this list.
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic void handleDistributionRequestResult(DistributionRequestResult result)
handleDistributionRequestResult in interface DistributionRequestResultSubscriberresult - The result object to handle.public void notifySubscribers(DistributionRequestsResult results)
results - DistributionRequestsResult object to pass to the subscribers.public AbstractDistributionRequest remove(int index)
remove in interface java.util.List<AbstractDistributionRequest>remove in class java.util.ArrayList<AbstractDistributionRequest>index - the index of the request object to be removed.
public boolean remove(java.lang.Object request)
remove in interface java.util.Collection<AbstractDistributionRequest>remove in interface java.util.List<AbstractDistributionRequest>remove in class java.util.ArrayList<AbstractDistributionRequest>request - The request to remove.
public boolean removeAll(java.util.Collection<?> collection)
removeAll in interface java.util.Collection<AbstractDistributionRequest>removeAll in interface java.util.List<AbstractDistributionRequest>removeAll in class java.util.AbstractCollection<AbstractDistributionRequest>collection -
protected void removeRange(int fromIndex,
int toIndex)
removeRange in class java.util.ArrayList<AbstractDistributionRequest>fromIndex - index of first request object to be removed.toIndex - index after last request object to be removed.
java.lang.IndexOutOfBoundsException - if fromIndex or toIndex out of range
(fromIndex < 0 || fromIndex >= size() || toIndex > size() || toIndex < fromIndex).public boolean retainAll(java.util.Collection<?> collection)
retainAll in interface java.util.Collection<AbstractDistributionRequest>retainAll in interface java.util.List<AbstractDistributionRequest>retainAll in class java.util.AbstractCollection<AbstractDistributionRequest>collection - containing request objects to be retained in this collection.
public void subscribeResults(DistributionRequestResultsSubscriber subscriber)
subscriber - Subscriber to add.public void unsubscribeResults(DistributionRequestResultsSubscriber subscriber)
subscriber - Subscriber to remove.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||