Search in sources :

Example 6 with ValueAnnotationProcessor

use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.

the class GrpcTransportConfig method readSslOption.

public SslOption readSslOption(final Properties properties) {
    final String sslPrefix = "profiler.transport.grpc.ssl.";
    String agentRootPath = properties.getProperty(AgentDirectory.AGENT_ROOT_PATH_KEY);
    final SslOption.Builder builder = new SslOption.Builder(agentRootPath);
    ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
    reader.process(builder, new PropertyPlaceholderHelper.PlaceholderResolver() {

        @Override
        public String resolvePlaceholder(String placeholderName) {
            String prefix = sslPrefix + placeholderName;
            return properties.getProperty(prefix);
        }
    });
    return builder.build();
}
Also used : PropertyPlaceholderHelper(com.navercorp.pinpoint.bootstrap.util.spring.PropertyPlaceholderHelper) ValueAnnotationProcessor(com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor) SslOption(com.navercorp.pinpoint.grpc.client.config.SslOption)

Example 7 with ValueAnnotationProcessor

use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.

the class ThriftTransportConfig method read.

public void read(Properties properties) {
    final ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
    reader.process(this, properties);
}
Also used : ValueAnnotationProcessor(com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor)

Example 8 with ValueAnnotationProcessor

use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.

the class DefaultInstrumentMatcherCacheConfigTest method constructor2.

@Test
public void constructor2() {
    Properties properties = new Properties();
    properties.put("profiler.instrument.matcher.interface.cache.size", "1");
    properties.put("profiler.instrument.matcher.interface.cache.entry.size", "2");
    properties.put("profiler.instrument.matcher.annotation.cache.size", "3");
    properties.put("profiler.instrument.matcher.annotation.cache.entry.size", "4");
    properties.put("profiler.instrument.matcher.super.cache.size", "5");
    properties.put("profiler.instrument.matcher.super.cache.entry.size", "6");
    InstrumentMatcherCacheConfig config = new DefaultInstrumentMatcherCacheConfig();
    ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
    reader.process(config, properties);
    assertEquals(1, config.getInterfaceCacheSize());
    assertEquals(2, config.getInterfaceCacheEntrySize());
    assertEquals(3, config.getAnnotationCacheSize());
    assertEquals(4, config.getAnnotationCacheEntrySize());
    assertEquals(5, config.getSuperCacheSize());
    assertEquals(6, config.getSuperCacheEntrySize());
}
Also used : ValueAnnotationProcessor(com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor) Properties(java.util.Properties) Test(org.junit.Test)

Example 9 with ValueAnnotationProcessor

use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.

the class DefaultThriftTransportConfig method read.

public void read(Properties properties) {
    final ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
    reader.process(this, properties);
}
Also used : ValueAnnotationProcessor(com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor)

Aggregations

ValueAnnotationProcessor (com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor)9 PropertyPlaceholderHelper (com.navercorp.pinpoint.bootstrap.util.spring.PropertyPlaceholderHelper)2 SslOption (com.navercorp.pinpoint.grpc.client.config.SslOption)2 Properties (java.util.Properties)2 Test (org.junit.Test)2 ClientOption (com.navercorp.pinpoint.grpc.client.config.ClientOption)1