T
- expected extension type (or Object when no super type (e.g. for annotated beans))public interface JerseyInstaller<T>
FeatureInstaller
.
Installer will be called in time of jersey start to properly register extensions in HK context.
Installer report()
method will be called only after jersey start (so if, for example, environment
command is started, jersey specific extensions will not be logged).
Installer must support HK2Managed
annotation, which delegates bean creation to HK2.
Use JerseyBinding
to properly support annotation.
Modifier and Type | Method and Description |
---|---|
void |
install(org.glassfish.hk2.utilities.binding.AbstractBinder binder,
com.google.inject.Injector injector,
java.lang.Class<T> type)
Called on jersey start to inject extensions into HK context.
|
void install(org.glassfish.hk2.utilities.binding.AbstractBinder binder, com.google.inject.Injector injector, java.lang.Class<T> type)
JerseyBinding
utility for proper types binding:
it provide utilities for various jersey extensions and use special "bridges" for registration to
respect guice scopes (most of the time we not register ready instance, but factory which delegates
creation to guice).binder
- hk binderinjector
- guice injectortype
- extension type to registerJerseyBinding
,
HK2Managed