Interface JerseyInstaller<T>
-
- Type Parameters:
T
- expected extension type (or Object when no super type (e.g. for annotated beans))
- All Known Implementing Classes:
AbstractJerseyInstaller
,JerseyProviderInstaller
,ResourceInstaller
public interface JerseyInstaller<T>
Marker interface for jersey extensions installer.Must be used together withFeatureInstaller
. Installer will be called in time of jersey start to properly register extensions in HK context. Installerreport()
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
andGuiceManaged
annotations, which delegates bean creation to HK2 or guice (as exception). Default target is declared byInstallersOptions.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.- Since:
- 16.11.2014
- See Also:
base class
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.
-
-
-
Method Detail
-
install
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. UseJerseyBinding
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).- Parameters:
binder
- hk binderinjector
- guice injectortype
- extension type to register- See Also:
JerseyBinding
,JerseyManaged
-
-