Class Service


  • public class Service
    extends Object
    Represents a Service.

    This container gives you access to the service instances and to the selected service instance.

    • Method Detail

      • selectServiceInstance

        public io.smallrye.mutiny.Uni<ServiceInstance> selectServiceInstance()
        Selects a service instance. The selection looks for the service instances and select the one to use using the load balancer.
        Returns:
        a Uni with a ServiceInstance, or with NoServiceInstanceFoundException if the load balancer failed to find a service instance capable of handling a call
        Throws:
        IllegalArgumentException - if the current service does not use a load balancer
      • getLoadBalancer

        public LoadBalancer getLoadBalancer()
        Get the underlying load balancer instance.
        Returns:
        load balancer
        Throws:
        IllegalArgumentException - if the current service does not use a load balancer.
      • getServiceDiscovery

        public ServiceDiscovery getServiceDiscovery()
        Get the underlying service discovery
        Returns:
        service discovery
      • isSecure

        public boolean isSecure()