|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.internal.ServiceProviders
public class ServiceProviders
Combines access to custom provider classes and instances
and providers registered via a HK2 module or Java Service Provider mechanism
(META-INF/services).
| Nested Class Summary | |
|---|---|
static class |
ServiceProviders.Builder
Service providers builder. |
static interface |
ServiceProviders.ServiceListener<T>
Asynchronous callback interface for handling all the service providers of a given contract type. |
| Method Summary | ||
|---|---|---|
|
getAll(java.lang.Class<T> providerContract)
Get all provider instances of the requested provider type found both in the internal storage as well as by performing service provider lookup in META-INF/services. |
|
|
getAll(java.lang.Class<T> providerContract,
java.util.Comparator<T> comparator)
Get all provider instances of the requested provider type found both in the internal storage as well as by performing service provider lookup in META-INF/services. |
|
|
getAll(java.lang.Class<T> providerContract,
ServiceProviders.ServiceListener<T> listener)
Get all provider instances of the requested provider type found both in the internal storage as well as by performing service provider lookup in META-INF/services. |
|
|
getCustom(java.lang.Class<T> providerContract)
Get all provider instances of the requested provider type from the list of internally registered provider instances and classes. |
|
|
getCustom(java.lang.Class<T> providerContract,
java.util.Comparator<T> comparator)
Get all provider instances of the requested provider type from the list of internally registered provider instances and classes. |
|
|
getCustom(java.lang.Class<T> providerContract,
ServiceProviders.ServiceListener<T> listener)
Get all provider instances of the requested provider type from the list of internally registered provider instances and classes. |
|
|
getDefault(java.lang.Class<T> providerContract)
Get all provider instances of the requested provider type found by performing service provider lookup in META-INF/services. |
|
|
getDefault(java.lang.Class<T> providerContract,
java.util.Comparator<T> comparator)
Get all provider instances of the requested provider type found by performing service provider lookup in META-INF/services. |
|
|
instantiate(java.lang.Class<T> providerContract,
java.lang.Class<? extends T>[] classes)
Instantiate providers of the given type using the array of provider implementation classes. |
|
|
instantiate(java.lang.Class<T> providerContract,
java.lang.String[] classNames)
Instantiate providers of the given type using the array of provider implementation class names. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public <T> java.util.Set<T> getCustom(java.lang.Class<T> providerContract)
META-INF/services.
T - provider Java type.providerContract - provider contract class.
public <T> java.util.List<T> getCustom(java.lang.Class<T> providerContract,
java.util.Comparator<T> comparator)
META-INF/services.
The returned provider list, if not empty, is sorted using the supplied
comparator before it is returned.
T - provider Java type.providerContract - provider contract class.comparator - contract comparator used for ordering provider instances
in the set.
public <T> java.util.Set<T> getDefault(java.lang.Class<T> providerContract)
META-INF/services. This method ignores any
internally registered provider instances or classes.
T - provider Java type.providerContract - provider contract class.
public <T> java.util.List<T> getDefault(java.lang.Class<T> providerContract,
java.util.Comparator<T> comparator)
META-INF/services. This method ignores any
internally registered provider instances or classes.
The returned provider list, if not empty, is sorted using the supplied
comparator before it is returned.
T - provider Java type.providerContract - provider contract class.comparator - contract comparator used for ordering provider instances
in the set.
public <T> java.util.Set<T> getAll(java.lang.Class<T> providerContract)
META-INF/services. This method returns a result that is a
combination of the results returned by getCustom(java.lang.Class)
and getDefault(java.lang.Class).
T - provider Java type.providerContract - provider contract class.
public <T> java.util.List<T> getAll(java.lang.Class<T> providerContract,
java.util.Comparator<T> comparator)
META-INF/services. This method returns a result that is a
combination of the results returned by getCustom(java.lang.Class)
and getDefault(java.lang.Class).
The returned provider list, if not empty, is sorted using the supplied
comparator before it is returned.
T - provider Java type.providerContract - provider contract class.comparator - contract comparator used for ordering provider instances
in the set.
public <T> void getCustom(java.lang.Class<T> providerContract,
ServiceProviders.ServiceListener<T> listener)
META-INF/services.
Rather than returning the list of found provider instances, the method
invokes the supplied provider
listener for every provider instance that matches the requested provider
type.
T - provider Java type.providerContract - provider contract class.listener - provider listener invoked with every matched provider instance.
public <T> void getAll(java.lang.Class<T> providerContract,
ServiceProviders.ServiceListener<T> listener)
META-INF/services.
Rather than returning the list of found provider instances, the method
invokes the supplied provider
listener for every provider instance that matches the requested provider
type.
T - provider Java type.providerContract - provider contract class.listener - provider listener invoked with every matched provider instance.
public <T> java.util.List<T> instantiate(java.lang.Class<T> providerContract,
java.lang.String[] classNames)
severe log entry is recorded and the
failing implementation class is ignored and not included in the returned
list of provider instances.
T - requested provider Java type.providerContract - provider contract class.classNames - provider implementation class names.
public <T> java.util.List<T> instantiate(java.lang.Class<T> providerContract,
java.lang.Class<? extends T>[] classes)
severe log entry is recorded and the failing
implementation class is ignored and not included in the returned list of
provider instances.
T - requested provider Java type.providerContract - provider contract class.classes - provider implementation classes.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||