Package io.joynr.jeeintegration.api
Interface ServiceLocator
-
- All Known Implementing Classes:
JeeJoynrServiceLocator
public interface ServiceLocatorThe container runtime will provide an instance of this which can be injected and then used in order to obtain client proxies for services.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceServiceLocator.ServiceProxyBuilder<T>Builder allowing you to set the various properties necessary for constructing a service proxy.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <I> ServiceLocator.ServiceProxyBuilder<I>builder(Class<I> serviceInterface, String... domains)Create aServiceLocator.ServiceProxyBuilderfor the given service interface and domains.<I> Iget(Class<I> serviceInterface, String domain)Deprecated.prefer using the builder.<I> Iget(Class<I> serviceInterface, String domain, long ttl)Deprecated.prefer using the builder.<I> Iget(Class<I> serviceInterface, String domain, MessagingQos messagingQos, DiscoveryQos discoveryQos)Deprecated.prefer using the builder.<I> Iget(Class<I> serviceInterface, Set<String> domains)Deprecated.prefer using the builder.<I> Iget(Class<I> serviceInterface, Set<String> domains, long ttl)Deprecated.prefer using the builder.<I> Iget(Class<I> serviceInterface, Set<String> domains, MessagingQos messagingQos, DiscoveryQos discoveryQos)Deprecated.prefer using the builder.<I> Iget(Class<I> serviceInterface, Set<String> domains, MessagingQos messagingQos, DiscoveryQos discoveryQos, String useCase)Deprecated.prefer using the builder.GuidedProxyBuildergetGuidedProxyBuilder(Class<?> interfaceClass, Set<String> domains)Returns a guided proxy builder instance to build a proxy object for a selected provider in a given set of domains.
-
-
-
Method Detail
-
get
@Deprecated <I> I get(Class<I> serviceInterface, String domain)
Deprecated.prefer using the builder.Obtains a client proxy for the given service interface in the given domain. Callsget(Class, String, MessagingQos, DiscoveryQos)with default values for messaging and discovery quality of service.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the service interface for which to get a client proxy.domain- the domain in which the service implementation must be available.- Returns:
- the client proxy, which can be used to call methods on the service service.
-
get
@Deprecated <I> I get(Class<I> serviceInterface, String domain, long ttl)
Deprecated.prefer using the builder.Likeget(Class, String), but allows you to specify the maximum time-to-live for messages sent to the service. Callsget(Class, String, MessagingQos, DiscoveryQos), setting the TTL passed in on the messaging quality of service and providing default values for the discovery quality of service.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the service interface for which to get a client proxy.domain- the domain in which the service implementation must be available.ttl- the maximum time to live for messages sent via the service. If the time to live expires (the message takes longer to deliver), then an exception is thrown.- Returns:
- the client proxy, which can be used to call methods on the service interface.
-
get
@Deprecated <I> I get(Class<I> serviceInterface, String domain, MessagingQos messagingQos, DiscoveryQos discoveryQos)
Deprecated.prefer using the builder.Likeget(Class, String), but allows you to specify the messaging and discovery quality of service information to use.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the service interface for which to get a client proxy.domain- the domain in which the service implementation must be available.messagingQos- the messaging quality of service information (including the time to live value) to use when communicating to the service.discoveryQos- the discovery quality of service information to use when communicating to the service.- Returns:
- the client proxy, which can be used to call methods on the service service.
-
get
@Deprecated <I> I get(Class<I> serviceInterface, Set<String> domains)
Deprecated.prefer using the builder.Obtains a client proxy for multiple services of the given service interface in the given domains. Callsget(Class, Set, MessagingQos, DiscoveryQos)with default values for messaging and discovery quality of service.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the BCI interface for which to get a client proxy.domains- the set of domains in which the service implementations must be available.- Returns:
- the client proxy, which can be used to call methods on the BCI service.
-
get
@Deprecated <I> I get(Class<I> serviceInterface, Set<String> domains, long ttl)
Deprecated.prefer using the builder.Likeget(Class, Set), but allows you to specify the maximum time-to-live for messages sent to the services. Callsget(Class, Set, MessagingQos, DiscoveryQos), setting the TTL passed in on the messaging quality of service and providing default values for the discovery quality of service.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the BCI interface for which to get a client proxy.domains- the set of domains in which the service implementations must be available.ttl- the maximum time to live for messages sent via the service. If the time to live expires (the message takes longer to deliver), then an exception is thrown.- Returns:
- the client proxy, which can be used to call methods on the BCI service.
-
get
@Deprecated <I> I get(Class<I> serviceInterface, Set<String> domains, MessagingQos messagingQos, DiscoveryQos discoveryQos)
Deprecated.prefer using the builder.Likeget(Class, Set), but allows you to specify the messaging and discovery quality of service information to use.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the BCI interface for which to get a client proxy.domains- the set of domains in which the service implementations must be available.messagingQos- the messaging quality of service information (including the time to live value) to use when communicating to the service.discoveryQos- the discovery quality of service information to use when communicating to the service.- Returns:
- the client proxy, which can be used to call methods on the BCI service.
-
get
@Deprecated <I> I get(Class<I> serviceInterface, Set<String> domains, MessagingQos messagingQos, DiscoveryQos discoveryQos, String useCase)
Deprecated.prefer using the builder.Likeget(Class, Set), but allows you to specify the messaging and discovery quality of service information to use, as well as the stateless async use case in order to identify theCallbackHandlerbean to use for processing stateless async replies received for requests made from this proxy.- Type Parameters:
I- the service type- Parameters:
serviceInterface- the BCI interface for which to get a client proxy.domains- the set of domains in which the service implementations must be available.messagingQos- the messaging quality of service information (including the time to live value) to use when communicating to the service.discoveryQos- the discovery quality of service information to use when communicating to the service.useCase- the name of the use case for identifying the relevantCallbackHandlerbean to use for processing stateless async replies received for requests made from this proxy.- Returns:
- the client proxy, which can be used to call methods on the BCI service.
-
builder
<I> ServiceLocator.ServiceProxyBuilder<I> builder(Class<I> serviceInterface, String... domains)
Create aServiceLocator.ServiceProxyBuilderfor the given service interface and domains.- Type Parameters:
I- the type of the service interface for which a service proxy builder should be created.- Parameters:
serviceInterface- the service interface for which to create the service proxy builder.domains- the list of domains which the proxy will use for looking up the services to communicate with. At least one domain must be provided.- Returns:
- the
ServiceLocator.ServiceProxyBuilderwhich can be used to setup the configuration with which to build the service proxy.
-
getGuidedProxyBuilder
GuidedProxyBuilder getGuidedProxyBuilder(Class<?> interfaceClass, Set<String> domains)
Returns a guided proxy builder instance to build a proxy object for a selected provider in a given set of domains.- Parameters:
interfaceClass- Interface the provider offers.domains- the set of domains to be considered when searching the providers.- Returns:
- After configuration, the returned GuidedProxyBuilder can be used to discover providers and build a proxy instance for the selected provider.
-
-