|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.felix.ipojo.handler.temporal.ServiceCollection
public class ServiceCollection
Maintains a service object collection.
This collection wrap the temporal dependency to be accessible from a
Collection, that can be passed to helper objects (Collaborators).
The onTimeout policies are executed when the Collection.iterator(),
Collection.toArray(Object[]) and Collection.toArray() methods
are called.
The Collection.iterator() method returns an ServiceCollection.ServiceIterator iterating
on a cached copy of available service objects. In the case that there are no
available services when the timeout is reached, the policies act as follows:
| Nested Class Summary | |
|---|---|
private class |
ServiceCollection.ServiceIterator
Iterator on a set of service objects. |
| Field Summary | |
|---|---|
private TemporalDependency |
m_dependency
The wrapped temporal dependencies. |
| Constructor Summary | |
|---|---|
ServiceCollection(TemporalDependency dep)
Creates a Service Collection. |
|
| Method Summary | |
|---|---|
boolean |
add(java.lang.Object o)
Unsupported method. |
boolean |
addAll(java.util.Collection c)
Unsupported method. |
void |
clear()
Unsupported method. |
boolean |
contains(java.lang.Object o)
Checks if the wrapped temporal dependencies has always access to the given service object.The method allows knowing if the provider returning the service object has leaved. |
boolean |
containsAll(java.util.Collection c)
Checks if the wrapped temporal dependencies has always access to the given service objects.The method allows knowing if providers returning the service objects have leaved. |
private java.util.List |
getAvailableObjects()
Helper method creating a list of available service objects. |
boolean |
isEmpty()
Checks if at least one provider matching with the dependency is available. |
java.util.Iterator |
iterator()
Gets an iterator on the actual list of available service objects. |
boolean |
remove(java.lang.Object o)
Unsupported method. |
boolean |
removeAll(java.util.Collection c)
Unsupported method. |
boolean |
retainAll(java.util.Collection c)
Unsupported method. |
int |
size()
Gets the number of available providers. |
java.lang.Object[] |
toArray()
Returns an array containing available service objects. |
java.lang.Object[] |
toArray(java.lang.Object[] a)
Returns an array containing available service objects. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
equals, hashCode |
| Field Detail |
|---|
private TemporalDependency m_dependency
| Constructor Detail |
|---|
public ServiceCollection(TemporalDependency dep)
dep - the wrapped temporal dependencies| Method Detail |
|---|
public boolean add(java.lang.Object o)
add in interface java.util.Collectiono - an object
Collection.add(java.lang.Object)public boolean addAll(java.util.Collection c)
addAll in interface java.util.Collectionc - an object
Collection.addAll(java.util.Collection)public void clear()
clear in interface java.util.CollectionCollection.clear()public boolean contains(java.lang.Object o)
contains in interface java.util.Collectiono - the service object
true if the object is still available,
false otherwise.Collection.contains(java.lang.Object)public boolean containsAll(java.util.Collection c)
containsAll in interface java.util.Collectionc - the set of service object
true if the objects are still available,
false otherwise.Collection.contains(java.lang.Object)public boolean isEmpty()
isEmpty in interface java.util.Collectiontrue if one provider or more satisfying the
dependency are available. Otherwise, returns falseCollection.isEmpty()private java.util.List getAvailableObjects()
public java.util.Iterator iterator()
iterator in interface java.lang.Iterableiterator in interface java.util.CollectionCollection.iterator()public boolean remove(java.lang.Object o)
remove in interface java.util.Collectiono - a object
Collection.remove(java.lang.Object)public boolean removeAll(java.util.Collection c)
removeAll in interface java.util.Collectionc - a set of objects
Collection.removeAll(java.util.Collection)public boolean retainAll(java.util.Collection c)
retainAll in interface java.util.Collectionc - a set of objects
Collection.retainAll(java.util.Collection)public int size()
size in interface java.util.CollectionCollection.size()public java.lang.Object[] toArray()
toArray in interface java.util.Collectionnull,
be empty, or can contain only one element (a default-implementation
object, or a nullable object).Collection.toArray()public java.lang.Object[] toArray(java.lang.Object[] a)
toArray in interface java.util.Collectiona - the array into which the elements of this collection
are to be stored, if it is big enough; otherwise, a new array
of the same runtime type is allocated for this purpose.
null,
be empty, or can contain only one element (a default-implementation
object, or a nullable object).Collection.toArray(java.lang.Object[])
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||