Package io.joynr.jeeintegration.api
Interface ProviderRegistrationSettingsFactory
-
public interface ProviderRegistrationSettingsFactoryProvide beans implementing this interface in order to customize the settings used by the joynr runtime for the registration ofservices(aka provider).You can create multiple beans implementing this interface. The first one which returns
truetoprovidesFor(Class)for a given service interface will be used to obtain settings (i.e.ProviderQosor GBID(s)) in order to perform the service registration. There is no guarantee in which order the factories will be asked, so it's safer to just provide one factory for a given service interface.
If no factory is found to provide settings for the service class, then default values are used.This interface offers default methods in order to allow implementations to customize only the settings they are interested in and not always implement the full interface.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default StringcreateDomain()This method is called in order to obtain a custom domain for registering the service with.default String[]createGbids()This method is called in order to obtain GBID(s) for registering the service with.default ProviderQoscreateProviderQos()This method is called in order to obtain a customProviderQosinstance for registering the service with.booleanprovidesFor(Class<?> serviceInterface)This method is queried on each bean which implements this interface in order to check if it can provide settings for a given service interface.default booleanprovidesFor(Class<?> serviceInterface, Class<?> serviceProviderBean)This method is queried on each bean which implements this interface in order to check if it can provide settings for a given service interface and an implemented service provider bean.
-
-
-
Method Detail
-
createProviderQos
default ProviderQos createProviderQos()
This method is called in order to obtain a customProviderQosinstance for registering the service with.- Returns:
- the provider QoS instance which joynr will use for service registration.
-
createGbids
default String[] createGbids()
This method is called in order to obtain GBID(s) for registering the service with.- Returns:
- array of GBIDs (one or more) of the backends in which joynr will register the service globally.
-
createDomain
default String createDomain()
This method is called in order to obtain a custom domain for registering the service with.- Returns:
- the domain which joynr will use for service registration.
-
providesFor
boolean providesFor(Class<?> serviceInterface)
This method is queried on each bean which implements this interface in order to check if it can provide settings for a given service interface.- Parameters:
serviceInterface- the service interface for which joynr is trying to find registration settings.- Returns:
trueif the implementing bean is responsible for the settings of this interface.
-
providesFor
default boolean providesFor(Class<?> serviceInterface, Class<?> serviceProviderBean)
This method is queried on each bean which implements this interface in order to check if it can provide settings for a given service interface and an implemented service provider bean.- Parameters:
serviceInterface- the service interface for which joynr is trying to find registration settings.serviceProviderBean- the service provider bean for which joynr is trying to find registration settings.- Returns:
trueif the implementing bean is responsible for the settings of this interface and the provider bean.
-
-