Injects service already registered in Akkamo context, using the key using which the service has been registered.
Injects service already registered in Akkamo context, using the key using which the
service has been registered. By default, if no service is found with this key, default
service is returned (if available). To disable this behavior, set the strict
parameter to
false
.
type of the service
additional mapping identifier
if true
, only named instance is returned if false then when nothing found
under key then default instance is returned if it exists and is initialized
class tag evidence
implementation of interface T
encapsulated in Some
if exists else None
Injects service already registered as an default service in Akkamo context.
Injects service already registered as an default service in Akkamo context.
type of the service
Akkamo context
implementation of interface T
encapsulated in Some
if exists else None
Registers service to the Akkamo context, such service is then available to any other
module via one of the inject
methods.
Registers service to the Akkamo context, such service is then available to any other
module via one of the inject
methods. This method allows to register service with optional
key, which is primarily used to disambiguate between multiple registered services of same
type and must be then specified when injecting the service. Please note that because the
Context is immutable, new updated instance will be returned after calling this method.
type of the service
service to register
optional key
class tag evidence
new updated instance of Context
Registers value into service, specified by its type and optional key, previously registered to the Akkamo context.
Registers value into service, specified by its type and optional key, previously registered to the Akkamo context. In fact, this serves as a shorthand for manually injecting the desired service from the context, and then registering the selected value into it.
type of previously registered service
type of value to be registered into the service
value to register
optional key, under which the service was previously registered into the context
class tag evidence
updated instance of immutable Context
ContextError
if operation cannot be completed for various reasons
Returns all registered instance of service of type T
, as a map where key is instance of
registered service and value is the set containing all keys, under the particular service
instance was registered.
Returns all registered instance of service of type T
, as a map where key is instance of
registered service and value is the set containing all keys, under the particular service
instance was registered.
type of the service
class tag evidence
map of all registered instances of service of type T
Get service already registered in Akkamo context, using the key using which the service has been registered.
Get service already registered in Akkamo context, using the key using which the
service has been registered. By default, if no service is found with this key, default
service is returned (if available). To disable this behavior, set the strict
parameter to
false
.
type of the service
additional mapping identifier
if true
, only named instance is returned if false then when nothing found
under key then default instance is returned if it exists and is initialized
class tag evidence
implementation of interface T
ContextError
if bean not exists
Get service already registered as an default service in Akkamo context.
Get service already registered as an default service in Akkamo context.
type of the service
Akkamo context
implementation of interface T
ContextError
if bean not exists
Registers service to the Akkamo context, such service is then available to any other
module via one of the inject
methods.
Registers service to the Akkamo context, such service is then available to any other
module via one of the inject
methods. This method allows to register service with key,
which is primarily used to disambiguate between multiple registered services of same
type and must be then specified when injecting the service. Please note that because the
Context is immutable, new updated instance will be returned after calling this method.
type of the service
service to register
optional key
class tag evidence
new updated instance of Context
Registers value into service, specified by its type and key, previously registered to the Akkamo context.
Registers value into service, specified by its type and key, previously registered to the Akkamo context. In fact, this serves as a shorthand for manually injecting the desired service from the context, and then registering the selected value into it.
type of previously registered service
type of value to be registered into the service
value to register
optional key, under which the service was previously registered into the context
class tag evidence
updated instance of immutable Context
ContextError
if operation cannot be completed for various reasons
Akkamo context represents the cornerstone of the Akkamo platform, as it is the place where different modules can register its own services provided for other modules (using one of
registerIn
methods) or can inject services already registered by other modules (using one of theinject
method). Please note that the Context is immutable and any update performed (e.g. registering service) will yield new, updated instance.