|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.glassfish.jersey.internal.inject.ProviderBinder
public class ProviderBinder
Class used for registration of the custom providers into HK2 service locator.
Custom providers are classes that implements specific JAX-RS or Jersey
SPI interfaces (e.g. MessageBodyReader and are
supplied by the user. These providers will be bound into the HK2 service locator
annotated by a @Custom qualifier annotation.
Use the @Custom qualifier annotation to retrieve these providers
from HK2 service locator. You may also use a one of the provider accessor utility
method defined in Providers class.
| Constructor Summary | |
|---|---|
ProviderBinder(ServiceLocator locator)
Create new provider binder instance. |
|
| Method Summary | |
|---|---|
void |
bindClasses(java.lang.Class<?>... classes)
Register/bind custom provider classes. |
void |
bindClasses(java.lang.Iterable<java.lang.Class<?>> classes)
Register/bind custom provider classes. |
void |
bindClasses(java.lang.Iterable<java.lang.Class<?>> classes,
boolean bindResources)
Register/bind custom provider classes that may also be resources. |
void |
bindInstances(java.util.Set<java.lang.Object> instances)
Register/bind custom provider instances. |
static void |
bindProvider(java.lang.Class<?> providerClass,
ContractProvider provider,
DynamicConfiguration dc)
Bind contract provider model to a provider class using the supplied HK2 dynamic configuration. |
static void |
bindProvider(java.lang.Object providerInstance,
ContractProvider provider,
DynamicConfiguration dc)
Bind contract provider model to a provider instance using the supplied HK2 dynamic configuration. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ProviderBinder(ServiceLocator locator)
locator - HK2 service locator the binder will use to bind the
providers into.| Method Detail |
|---|
public void bindInstances(java.util.Set<java.lang.Object> instances)
instances - custom provider instances.public void bindClasses(java.lang.Class<?>... classes)
PerLookup.
classes - custom provider classes.public void bindClasses(java.lang.Iterable<java.lang.Class<?>> classes)
PerLookup.
classes - custom provider classes.
public void bindClasses(java.lang.Iterable<java.lang.Class<?>> classes,
boolean bindResources)
PerLookup.
If bindAsResources is set to true, the providers will also be bound
as resources.
classes - custom provider classes.bindResources - if true, the provider classes will also be bound as
resources.
public static void bindProvider(java.lang.Class<?> providerClass,
ContractProvider provider,
DynamicConfiguration dc)
provider - contract provider model.dc - HK2 dynamic service locator configuration.
public static void bindProvider(java.lang.Object providerInstance,
ContractProvider provider,
DynamicConfiguration dc)
contract provider model
is ignored as instances can only be bound as "singletons".
providerInstance - provider instance.provider - contract provider model.dc - HK2 dynamic service locator configuration.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||