GuicedEE client SPI contracts: IGuiceContext, lifecycle hook interfaces (IGuicePreStartup, IGuiceModule, IGuicePostStartup, IGuicePreDestroy, IGuiceConfigurator) — all extending IDefaultService for sort ordering and enablement, CallScope and CallScopeProperties, IJsonRepresentation for Jackson serialization, and JPMS module setup. Use when programming against GuicedEE SPI contracts, understanding the lifecycle hook interfaces, implementing IDefaultService, using call scoping, or referencing the client API without the full runtime.
The client SPI library — defines the contracts that all GuicedEE modules program against without pulling in the full runtime.
This library provides the interfaces and annotations for the GuicedEE lifecycle. Application code and library modules depend on client to register hooks, access the injector, and define scoping — without coupling to the runtime engine in inject.
com.guicedee:client dependency.IGuiceContext.registerModuleForScanning.add("my.app");
IGuiceContext context = IGuiceContext.instance();
Injector injector = context.inject();
provides:
module my.app {
requires com.guicedee.client;
provides com.guicedee.client.services.lifecycle.IGuiceModule
with my.app.AppModule;
}
All hooks extend IDefaultService<J> (CRTP) — override sortOrder() to control execution order and enabled() to conditionally skip.
| Interface | When | Purpose |
|---|---|---|
IGuiceConfigurator<J> | First | Configure GuiceConfig before scanning |
IGuicePreStartup<J> | After scan, before injector | Pre-startup tasks, returns List<Future<Boolean>> |
IGuiceModule<J> | During injector creation | Standard Guice AbstractModule |
IGuicePostStartup<J> | After injector ready | Post-startup tasks, returns List<Uni<Boolean>> |
IGuicePreDestroy<J> | On shutdown | Cleanup resources |
| Class | Purpose |
|---|---|
IGuiceContext | Singleton access to injector and context |
IDefaultService | Base for all SPI hooks (CRTP) with sortOrder() and enabled() |
CallScope / CallScopeProperties | Request-scoped injection context |
IJsonRepresentation | Jackson ObjectMapper configuration contract |
requires com.guicedee.client;.module-info.java + META-INF/services/).sortOrder() controls execution order — lower runs first.sortOrder() — all futures in a group must complete before the next group.