Package io.cloudstub.core.spi
Interface CloudStubContext
- All Known Implementing Classes:
CloudStubContextImpl
public interface CloudStubContext
Passed to
CloudStubService.register(CloudStubContext) at startup.
Carries the two objects a module needs during registration: the stub registrar for wiring HTTP stubs, and the state store for reading and writing live data at request time.
Adding future capabilities (metrics, config) extends this interface without touching the
CloudStubService signature.
-
Method Summary
Modifier and TypeMethodDescriptionThe registrar through which the module declares its HTTP stubs.The shared state store.
-
Method Details
-
registrar
StubRegistrar registrar()The registrar through which the module declares its HTTP stubs.- Returns:
- the stub registrar for this registration pass
-
stateStore
StateStore stateStore()The shared state store. Modules read and write under their own service-ID prefix; seeStateStorefor the key naming convention.- Returns:
- the shared state store
-