|
||||||||||
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 Iterator
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:
Constructor Summary | |
---|---|
ServiceCollection(TemporalDependency dep)
Creates a Service Collection. |
Method Summary | |
---|---|
boolean |
add(Object o)
Unsupported method. |
boolean |
addAll(Collection c)
Unsupported method. |
void |
clear()
Unsupported method. |
boolean |
contains(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(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. |
boolean |
isEmpty()
Checks if at least one provider matching with the dependency is available. |
Iterator |
iterator()
Gets an iterator on the actual list of available service objects. |
boolean |
remove(Object o)
Unsupported method. |
boolean |
removeAll(Collection c)
Unsupported method. |
boolean |
retainAll(Collection c)
Unsupported method. |
int |
size()
Gets the number of available providers. |
Object[] |
toArray()
Returns an array containing available service objects. |
Object[] |
toArray(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 |
Constructor Detail |
---|
public ServiceCollection(TemporalDependency dep)
dep
- the wrapped temporal dependenciesMethod Detail |
---|
public boolean add(Object o)
add
in interface Collection
o
- an object
Collection.add(java.lang.Object)
public boolean addAll(Collection c)
addAll
in interface Collection
c
- an object
Collection.addAll(java.util.Collection)
public void clear()
clear
in interface Collection
Collection.clear()
public boolean contains(Object o)
contains
in interface Collection
o
- the service object
true
if the object is still available,
false
otherwise.Collection.contains(java.lang.Object)
public boolean containsAll(Collection c)
containsAll
in interface Collection
c
- 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 Collection
true
if one provider or more satisfying the
dependency are available. Otherwise, returns false
Collection.isEmpty()
public Iterator iterator()
iterator
in interface Collection
Collection.iterator()
public boolean remove(Object o)
remove
in interface Collection
o
- a object
Collection.remove(java.lang.Object)
public boolean removeAll(Collection c)
removeAll
in interface Collection
c
- a set of objects
Collection.removeAll(java.util.Collection)
public boolean retainAll(Collection c)
retainAll
in interface Collection
c
- a set of objects
Collection.retainAll(java.util.Collection)
public int size()
size
in interface Collection
Collection.size()
public Object[] toArray()
toArray
in interface Collection
null
,
be empty, or can contain only one element (a default-implementation
object, or a nullable object).Collection.toArray()
public Object[] toArray(Object[] a)
toArray
in interface Collection
a
- 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 |