Class ServiceProperties

    • Field Detail

      • SERVICE_NAME

        public static final String SERVICE_NAME
        Service property identifying a service name qualifier.

        This property may be supplied in the properties object passed to the OSGi service registration method. The value of this property must be of type String and correspond to the name qualifier of the service.

        Value is service.name.

        See Also:
        Constant Field Values
      • SERVICE_CONTRIBUTOR

        public static final String SERVICE_CONTRIBUTOR
        Service property identifying a service contributor indentifier.

        This property may be supplied in the properties object passed to the OSGi service registration method. The value of this property must be of type String and correspond to the service contributor indentifier.

        Value is service.contributor.

        See Also:
        Constant Field Values
      • SERVICE_TYPE_PARAMETER

        public static final String SERVICE_TYPE_PARAMETER
        Service property identifying a service type parameter.

        This property may be supplied in the properties object passed to the OSGi service registration method. The value of this property must be of type String and correspond to the type parameter name of the Generic typed service.

        Value is service.typeParameter.

        See Also:
        Constant Field Values
    • Method Detail

      • contributed

        public static Map<String,​?> contributed​(String contributor)
        Create service properties with the given service contributor indentifier property. Resulting properties map may be used for contributed service registration or service import.

        May be useful for named service registration.

        Parameters:
        contributor - the service contributor indentifier property, cannot be null
        Returns:
        a properties map to use, never null
      • named

        public static Map<String,​?> named​(String name)
        Create service properties with the given service name property. Resulting properties map may be used for named service registration or service import.

        May be useful for named service registration.

        Parameters:
        name - the name to set as service name property, cannot be null
        Returns:
        a properties map to use, never null
      • named

        public static Map<String,​?> named​(String name,
                                                String contributor)
        Create service properties with the given service name property and the given service contributor indentifier property. Resulting properties map may be used for named contributed service registration or service import.

        May be useful for named service registration.

        Parameters:
        name - the name to set as service name property, cannot be null
        contributor - the service contributor indentifier property, cannot be null
        Returns:
        a properties map to use, never null
      • typed

        public static Map<String,​?> typed​(com.google.inject.TypeLiteral<?> typeLiteral)
        Create service properties with the given Guice type literal property. Resulting properties map may be used for typed service registration or service import.

        May be useful for Generic typed service registration.

        Parameters:
        typeLiteral - the type literal to set as service type parameter property, cannot be null
        Returns:
        a properties map to use, never null