Package com._1c.g5.wiring
Interface IInjectorAwareServiceRegistrationBuilder<T>
-
- Type Parameters:
T
- the registering service type
- All Superinterfaces:
IServiceRegistrationBuilder<T>
- All Known Subinterfaces:
IInjectorAwareManagedServiceRegistrationBuilder<T>
public interface IInjectorAwareServiceRegistrationBuilder<T> extends IServiceRegistrationBuilder<T>
Injected OSGi service registration builder. Provides fluent API to configure and register OSGi service.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
registerInjected()
Register the service interface with implemetation from the parent Guice injector with the same type as builder service type key.void
registerInjected(com.google.inject.Key<? extends T> registerTypeKey)
Register the service interface with implemetation from the given Guice injector with the given injector implemetation type key.void
registerInjected(com.google.inject.TypeLiteral<? extends T> typeLiteral)
Register the service interface with implemetation from the parent Guice injector with the given injector type literal as key.void
registerInjected(Class<? extends T> registerType)
Register the service interface with implemetation from the parent Guice injector with the given injector type key.void
registerInjected(Class<? extends T> registerType, Annotation annotation)
Register the service interface with implemetation from the parent Guice injector with the given injector type and annotation as key.IInjectorAwareServiceRegistrationBuilder<T>
withProperties(Map<String,?> properties)
Associate the given properties map with registering service.IInjectorAwareServiceRegistrationBuilder<T>
withProperty(String key, Object value)
Associate the given property with registering service.-
Methods inherited from interface com._1c.g5.wiring.IServiceRegistrationBuilder
registerInstance
-
-
-
-
Method Detail
-
withProperty
IInjectorAwareServiceRegistrationBuilder<T> withProperty(String key, Object value)
Description copied from interface:IServiceRegistrationBuilder
Associate the given property with registering service. All builded properties will be combined.- Specified by:
withProperty
in interfaceIServiceRegistrationBuilder<T>
- Parameters:
key
- the propertyString
key, cannot benull
value
- the property value, cannot benull
- Returns:
- a reference to this builder, never
null
-
withProperties
IInjectorAwareServiceRegistrationBuilder<T> withProperties(Map<String,?> properties)
Description copied from interface:IServiceRegistrationBuilder
Associate the given properties map with registering service. All builded properties will be combined.- Specified by:
withProperties
in interfaceIServiceRegistrationBuilder<T>
- Parameters:
properties
- the properties map, cannot benull
- Returns:
- a reference to this builder, never
null
-
registerInjected
void registerInjected()
Register the service interface with implemetation from the parent Guice injector with the same type as builder service type key.Instances cardinality is controlled by the Guice injector binding scope: binded injector
Provider
will be used to get instances of services during service consumer OSGi service access.
-
registerInjected
void registerInjected(Class<? extends T> registerType)
Register the service interface with implemetation from the parent Guice injector with the given injector type key.Single instance of service will be registered regardless of injector binding scope and provider settings.
- Parameters:
registerType
- the implemetation type to get from injector and register, cannot benull
-
registerInjected
void registerInjected(Class<? extends T> registerType, Annotation annotation)
Register the service interface with implemetation from the parent Guice injector with the given injector type and annotation as key.Single instance of service will be registered regardless of injector binding scope and provider settings.
- Parameters:
registerType
- the implemetation type to get from injector and register, cannot benull
annotation
- he injector implemetation annotation to register, cannot benull
-
registerInjected
void registerInjected(com.google.inject.TypeLiteral<? extends T> typeLiteral)
Register the service interface with implemetation from the parent Guice injector with the given injector type literal as key.Single instance of service will be registered regardless of injector binding scope and provider settings.
- Parameters:
typeLiteral
- the implemetation type literal to get from injector and register, cannot benull
-
registerInjected
void registerInjected(com.google.inject.Key<? extends T> registerTypeKey)
Register the service interface with implemetation from the given Guice injector with the given injector implemetation type key.Single instance of service will be registered regardless of injector binding scope and provider settings.
- Parameters:
registerTypeKey
- the implemetation type key to get from injector and register, cannot benull
-
-