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 JerseyManaged and
GuiceManaged annotations, which delegates
bean creation to HK2 or guice (as exception). Default target is declared by
InstallersOptions.JerseyExtensionsManagedByGuice option.
By default, jersey extensions should be registered in singleton scope, unless explicit scoping annotation
is present on bean. Forced singleton could be disabled with
InstallersOptions.ForceSingletonForJerseyExtensions option.
Use JerseyBinding to properly support annotation.
base class| Modifier and Type | Method and Description |
|---|---|
void |
install(org.glassfish.jersey.internal.inject.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.jersey.internal.inject.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,
JerseyManaged