org.qi4j.api.service
Interface Availability

All Known Subinterfaces:
AbstractEnabledCircuitBreakerAvailability
All Known Implementing Classes:
AbstractEnabledCircuitBreakerAvailability.Mixin

public interface Availability

Services can implement this interface in order to allow Qi4j to ask it whether it is currently available for use or not. This is accessed by clients through the ServiceReference of the service. Services that do not implement this are always considered to be available.


Method Summary
 boolean isAvailable()
          Implementations should return true if the underlying service is currently available for use.
 

Method Detail

isAvailable

boolean isAvailable()
Implementations should return true if the underlying service is currently available for use. Reasons why a service might not be available is either if it has been configured not to be (see the Enabled interface), or if an underlying resource is currently unavailable.

Returns:
true if the service is available, false otherwise.