ServiceSelector

@ApiStatus.Experimental
interface ServiceSelector<S : ModelMetadata>

Selects a service of one family by registration name, by role, by the family default, or by a supplied instance.

Parameters

S

the family's service type

Functions

Link copied to clipboard
abstract fun byRole(role: String): S

Returns the service bound to role in this family.

Link copied to clipboard
abstract fun defaultService(): S

Returns the family default service.

Link copied to clipboard
abstract fun named(name: String): S

Returns the service registered under name.

Link copied to clipboard
abstract fun using(service: S): S

Returns service as the selection. The service is not registered.