use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.
the class GrpcTransportConfig method read.
public void read(Properties properties) {
ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
reader.process(this, properties);
this.agentClientOption = readAgentClientOption(properties);
// Metadata
this.metadataClientOption = readMetadataClientOption(properties);
// Stat
this.statClientOption = readStatClientOption(properties);
// Span
this.spanClientOption = readSpanClientOption(properties);
// Ssl
SslOption sslOption = readSslOption(properties);
this.sslOption = sslOption;
}
use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.
the class ProfilerConfigLoader method loadPropertyValues.
// for test
private static void loadPropertyValues(ProfilerConfig profilerConfig, Properties properties) {
ValueAnnotationProcessor processor = new ValueAnnotationProcessor();
processor.process(profilerConfig, properties);
}
use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.
the class GrpcTransportConfig method read.
public void read(Properties properties) {
final ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
reader.process(this, properties);
}
use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.
the class ClientOptionTest method build.
@Test
public void build() {
Properties properties = new Properties();
properties.setProperty("keepalive.time.millis", "1");
properties.setProperty("keepalive.timeout.millis", "2");
properties.setProperty("flow-control.window.size", "65535");
properties.setProperty("headers.size.max", "4");
properties.setProperty("message.inbound.size.max", "5");
properties.setProperty("connect.timeout.millis", "6");
properties.setProperty("write.buffer.highwatermark", "7");
properties.setProperty("write.buffer.lowwatermark", "8");
ClientOption clientOption = new ClientOption();
ValueAnnotationProcessor processor = new ValueAnnotationProcessor();
processor.process(clientOption, properties);
assertEquals(1, clientOption.getKeepAliveTime());
assertEquals(2, clientOption.getKeepAliveTimeout());
assertEquals(false, clientOption.isKeepAliveWithoutCalls());
assertEquals(TimeUnit.DAYS.toMillis(30), clientOption.getIdleTimeoutMillis());
assertEquals(65535, clientOption.getFlowControlWindow());
assertEquals(4, clientOption.getMaxHeaderListSize());
assertEquals(5, clientOption.getMaxInboundMessageSize());
assertEquals(6, clientOption.getConnectTimeout());
assertEquals(7, clientOption.getWriteBufferHighWaterMark());
assertEquals(8, clientOption.getWriteBufferLowWaterMark());
}
use of com.navercorp.pinpoint.bootstrap.config.util.ValueAnnotationProcessor in project pinpoint by naver.
the class GrpcTransportConfig method readClientOption.
private ClientOption readClientOption(final Properties properties, final String transportName) {
final ClientOption clientOption = new ClientOption();
ValueAnnotationProcessor reader = new ValueAnnotationProcessor();
reader.process(clientOption, new PropertyPlaceholderHelper.PlaceholderResolver() {
@Override
public String resolvePlaceholder(String placeholderName) {
String prefix = transportName + placeholderName;
return properties.getProperty(prefix);
}
});
return clientOption;
}
Aggregations