Class AutoJAXRSBindingGuiceRole
java.lang.Object
com.peterphi.std.guice.web.rest.setup.AutoJAXRSBindingGuiceRole
- All Implemented Interfaces:
GuiceRole
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadjustConfigurations(List<PropertyFile> configs) Provides an opportunity, pre-compositing, to influence the configuration sources and order.voidinjectorCreated(com.google.inject.Stage stage, ClassScannerFactory scanner, GuiceConfig config, GuiceSetup setup, List<com.google.inject.Module> modules, AtomicReference<com.google.inject.Injector> injectorRef, com.codahale.metrics.MetricRegistry metrics) Called once the Injector has been createdvoidregister(com.google.inject.Stage stage, ClassScannerFactory scannerFactory, GuiceConfig config, GuiceSetup setup, List<com.google.inject.Module> modules, AtomicReference<com.google.inject.Injector> injectorRef, com.codahale.metrics.MetricRegistry metrics) Provides an opportunity to influence modules (adding, removing, reordering) being loaded.
-
Constructor Details
-
AutoJAXRSBindingGuiceRole
public AutoJAXRSBindingGuiceRole()
-
-
Method Details
-
adjustConfigurations
Description copied from interface:GuiceRoleProvides an opportunity, pre-compositing, to influence the configuration sources and order. Configuration sources earlier in this list will be overridden by configuration sources later in the list. Called beforeGuiceRole.register(Stage, ClassScannerFactory, GuiceConfig, GuiceSetup, List, AtomicReference, MetricRegistry)- Specified by:
adjustConfigurationsin interfaceGuiceRole
-
register
public void register(com.google.inject.Stage stage, ClassScannerFactory scannerFactory, GuiceConfig config, GuiceSetup setup, List<com.google.inject.Module> modules, AtomicReference<com.google.inject.Injector> injectorRef, com.codahale.metrics.MetricRegistry metrics) Description copied from interface:GuiceRoleProvides an opportunity to influence modules (adding, removing, reordering) being loaded. Called before the GuiceSetup class has loaded its modules. Called beforeGuiceRole.injectorCreated(Stage, ClassScannerFactory, GuiceConfig, GuiceSetup, List, AtomicReference, MetricRegistry)- Specified by:
registerin interfaceGuiceRolescannerFactory- a factory for a classpath scanner for the user application classes. Implementations should not hold on to this for long (to save memory usage)injectorRef- a reference which will be updated to contain the Injector once the guice environment has been set upmetrics- the MetricsRegistry for environment-wide metrics
-
injectorCreated
public void injectorCreated(com.google.inject.Stage stage, ClassScannerFactory scanner, GuiceConfig config, GuiceSetup setup, List<com.google.inject.Module> modules, AtomicReference<com.google.inject.Injector> injectorRef, com.codahale.metrics.MetricRegistry metrics) Description copied from interface:GuiceRoleCalled once the Injector has been created- Specified by:
injectorCreatedin interfaceGuiceRolescanner- a factory for a classpath scanner for the user application classes. Implementations should not hold on to this for long (to save memory usage)modules- the final list of modules in useinjectorRef- the reference to the injector, must contain a non-null valuemetrics- the MetricsRegistry for environment-wide metrics
-