Provider when
it is desired to iterate over more than one returned instance of the type.
This interface also has several methods which allow the user to further
narrow down the selected services at runtime. It can also provide
an Iterable of ServiceHandle for finer control of the lifecycle
of services found
The iterator returned will be in ranked order (with DescriptorRank as primary key, largest rank first and ServiceID as secondary key, smallest id first)
| Modifier and Type | Method and Description |
|---|---|
| public ServiceHandle | Returns: A ServiceHandle for the service, or null if there is currently no service definition availableRather than getting the service directly with get (in which case the returned service cannot be disposed of) this method will instead return a service handle for the current best service. |
| public int | Returns: the size of the iterator that would be chosenReturns the size of the iterator that would be returned |
| public Iterable | Returns: An iterator of ServiceHandles for the set of services represtended by this IterableProviderThis version of iterator returns an iterator of ServiceHandles rather than returning the services (which then have no way to be properly destroyed) |
| public IterableProvider | |
| public <U> IterableProvider | |
| public IterableProvider | Returns: An iterator restricted with the given qualifiersThe qualifiers to further restrict this iterator to qualifiers)A set of qualifiers to further restrict this iterator to. |
| getHandle | back to summary |
|---|---|
| public ServiceHandle Rather than getting the service directly with get (in which case the returned service cannot be disposed of) this method will instead return a service handle for the current best service.
| |
| getSize | back to summary |
|---|---|
| public int getSize() Returns the size of the iterator that would be returned
| |
| handleIterator | back to summary |
|---|---|
| public Iterable This version of iterator returns an iterator of ServiceHandles rather than returning the services (which then have no way to be properly destroyed)
| |
| named | back to summary |
|---|---|
| public IterableProvider Returns an IterableProvider that is further qualified with the given name
| |
| ofType | back to summary |
|---|---|
| public <U> IterableProvider Returns an IterableProvider that is of the given type. This type must be one of the type safe contracts of the original iterator
| |
| qualifiedWith | back to summary |
|---|---|
| public IterableProvider A set of qualifiers to further restrict this iterator to.
| |