public class DefaultServiceContext extends Object implements ServiceContext
| Constructor and Description |
|---|
DefaultServiceContext(Set<Service> services) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allHealthy() |
boolean |
checkStatus(ServiceInstance.Status status)
Checks whether all the
ServiceInstances of all Services in this context are in the specified ServiceInstance.Status |
String |
getFormattedErrors() |
Service |
getService(String name) |
Set<Service> |
getServices() |
ServiceContext |
merge(ServiceContext context) |
ServiceContext |
subtract(ServiceContext context) |
public Set<Service> getServices()
getServices in interface ServiceContextpublic Service getService(String name)
getService in interface ServiceContextname - the name of the requested svc as declared in Svcpublic ServiceContext merge(ServiceContext context)
merge in interface ServiceContextpublic boolean allHealthy()
allHealthy in interface ServiceContextpublic boolean checkStatus(ServiceInstance.Status status)
ServiceContextServiceInstances of all Services in this context are in the specified ServiceInstance.StatuscheckStatus in interface ServiceContextstatus - the ServiceInstance.Status to checkpublic String getFormattedErrors()
getFormattedErrors in interface ServiceContextpublic ServiceContext subtract(ServiceContext context)
subtract in interface ServiceContextCopyright © 2021. All rights reserved.