Search in sources :

Example 1 with ServiceLabel

use of org.springframework.cloud.service.ServiceInfo.ServiceLabel in project spring-cloud-connectors by spring-cloud.

the class ServiceConnectorCreatorRegistry method getServiceLabel.

private static String getServiceLabel(ServiceInfo serviceInfo) {
    Class<? extends ServiceInfo> serviceInfoClass = serviceInfo.getClass();
    ServiceLabel labelAnnotation = serviceInfoClass.getAnnotation(ServiceInfo.ServiceLabel.class);
    if (labelAnnotation == null) {
        return null;
    } else {
        return labelAnnotation.value();
    }
}
Also used : ServiceInfo(org.springframework.cloud.service.ServiceInfo) CompositeServiceInfo(org.springframework.cloud.service.CompositeServiceInfo) ServiceLabel(org.springframework.cloud.service.ServiceInfo.ServiceLabel)

Aggregations

CompositeServiceInfo (org.springframework.cloud.service.CompositeServiceInfo)1 ServiceInfo (org.springframework.cloud.service.ServiceInfo)1 ServiceLabel (org.springframework.cloud.service.ServiceInfo.ServiceLabel)1