Interface IInjectorAwareServiceRegistrationBuilder<T>

    • Method Detail

      • 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 be null
      • 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 be null
        annotation - he injector implemetation annotation to register, cannot be null
      • 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 be null
      • 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 be null