Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.sun.jersey.spi.service
Class ServiceFinder.ServiceIteratorProvider<T>

    java.lang.Object
      com.sun.jersey.spi.service.ServiceFinder.ServiceIteratorProvider<T>

Type Parameters:
  `T` - the type of service.

Direct Known Subclasses:
  ServiceFinder.DefaultServiceIteratorProvider

Enclosing class:
  ServiceFinder<T>

    public abstract static class ServiceFinder.ServiceIteratorProvider<T>

extends java.lang.Object

Supports iteration of provider instances or classes.

The default implementation looks up provider classes from META-INF/services files, see `ServiceFinder.DefaultServiceIteratorProvider`. This implementation may be overridden by invoking `ServiceFinder.setIteratorProvider(com.sun.jersey.spi.service.ServiceFinder.ServiceIteratorProvider)`.

Constructor Summary
`ServiceFinder.ServiceIteratorProvider()`

Method Summary
`abstract java.util.Iterator<java.lang.Class<T>>` | `createClassIterator(java.lang.Class<T> service, java.lang.String serviceName, java.lang.ClassLoader loader, boolean ignoreOnClassNotFound)` Iterate over provider classes of a service.
`abstract java.util.Iterator<T>` | `createIterator(java.lang.Class<T> service, java.lang.String serviceName, java.lang.ClassLoader loader, boolean ignoreOnClassNotFound)` Iterate over provider instances of a service.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ServiceFinder.ServiceIteratorProvider

    public ServiceFinder.ServiceIteratorProvider()

Method Detail

### createIterator

    public abstract java.util.Iterator<T> createIterator(java.lang.Class<T> service,
                                                         java.lang.String serviceName,
                                                         java.lang.ClassLoader loader,
                                                         boolean ignoreOnClassNotFound)

  Iterate over provider instances of a service.

  Parameters:
    `service` - the service class.
    `serviceName` - the service name.
    `loader` - the class loader to utilize when loading provider classes.
    `ignoreOnClassNotFound,` - if true ignore an instance if the corresponding provider class if cannot be found, otherwise throw a `ClassNotFoundException`.
  Returns:
    the provider instance iterator.

### createClassIterator

    public abstract java.util.Iterator<java.lang.Class<T>> createClassIterator(java.lang.Class<T> service,
                                                                               java.lang.String serviceName,
                                                                               java.lang.ClassLoader loader,
                                                                               boolean ignoreOnClassNotFound)

  Iterate over provider classes of a service.

  Parameters:
    `service` - the service class.
    `serviceName` - the service name.
    `loader` - the class loader to utilize when loading provider classes.
    `ignoreOnClassNotFound,` - if true ignore the provider class if cannot be found, otherwise throw a `ClassNotFoundException`.
  Returns:
    the provider class iterator.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 Oracle Corporation. All Rights Reserved.