Search in sources :

Example 1 with ServiceTypeRegistry

use of com.navercorp.pinpoint.common.trace.ServiceTypeRegistry in project pinpoint by naver.

the class DefaultServiceTypeRegistryService method buildServiceTypeRegistry.

private ServiceTypeRegistry buildServiceTypeRegistry() {
    ServiceTypeRegistry.Builder builder = new ServiceTypeRegistry.Builder();
    StaticFieldLookUp<ServiceType> staticFieldLookUp = new StaticFieldLookUp<ServiceType>(ServiceType.class, ServiceType.class);
    List<ServiceType> lookup = staticFieldLookUp.lookup();
    for (ServiceType serviceType : lookup) {
        if (logger.isInfoEnabled()) {
            logger.info("add Default ServiceType:" + serviceType);
        }
        builder.addServiceType(serviceType);
    }
    final List<ServiceTypeInfo> types = loadType();
    for (ServiceTypeInfo type : types) {
        if (logger.isInfoEnabled()) {
            logger.info("add Plugin ServiceType:" + type.getServiceType());
        }
        builder.addServiceType(type.getServiceType());
    }
    return builder.build();
}
Also used : ServiceTypeRegistry(com.navercorp.pinpoint.common.trace.ServiceTypeRegistry) StaticFieldLookUp(com.navercorp.pinpoint.common.util.StaticFieldLookUp) ServiceTypeInfo(com.navercorp.pinpoint.common.trace.ServiceTypeInfo) ServiceType(com.navercorp.pinpoint.common.trace.ServiceType)

Aggregations

ServiceType (com.navercorp.pinpoint.common.trace.ServiceType)1 ServiceTypeInfo (com.navercorp.pinpoint.common.trace.ServiceTypeInfo)1 ServiceTypeRegistry (com.navercorp.pinpoint.common.trace.ServiceTypeRegistry)1 StaticFieldLookUp (com.navercorp.pinpoint.common.util.StaticFieldLookUp)1