本文整理了Java中org.glassfish.tyrus.core.Utils.getProperty()
方法的一些代码示例,展示了Utils.getProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getProperty()
方法的具体详情如下:
包路径:org.glassfish.tyrus.core.Utils
类名称:Utils
方法名:getProperty
[英]Get typed property from generic property map.
[中]从泛型属性映射中获取类型化属性。
代码示例来源:origin: org.glassfish.tyrus/tyrus-core
/**
* Get typed property from generic property map.
*
* @param properties property map.
* @param key key of value to be retrieved.
* @param type type of value to be retrieved.
* @param <T> type of value to be retrieved.
* @return typed value or {@code null} if property is not set or value is not assignable.
*/
public static <T> T getProperty(Map<String, Object> properties, String key, Class<T> type) {
return getProperty(properties, key, type, null);
}
代码示例来源:origin: eclipse-ee4j/tyrus
/**
* Get typed property from generic property map.
*
* @param properties property map.
* @param key key of value to be retrieved.
* @param type type of value to be retrieved.
* @param <T> type of value to be retrieved.
* @return typed value or {@code null} if property is not set or value is not assignable.
*/
public static <T> T getProperty(Map<String, Object> properties, String key, Class<T> type) {
return getProperty(properties, key, type, null);
}
代码示例来源:origin: eclipse-ee4j/tyrus
this.connectToServerUriParam = connectToServerUriParam;
MaskingKeyGenerator maskingKeyGenerator = Utils.getProperty(properties, ClientProperties
.MASKING_KEY_GENERATOR, MaskingKeyGenerator.class, null);
protocolHandler = DEFAULT_VERSION.createHandler(true, maskingKeyGenerator);
this.redirectEnabled = Utils.getProperty(properties, ClientProperties.REDIRECT_ENABLED, Boolean.class, false);
Integer redirectThreshold = Utils.getProperty(properties, ClientProperties.REDIRECT_THRESHOLD, Integer.class,
DEFAULT_REDIRECT_THRESHOLD);
if (redirectThreshold == null) {
Utils.getProperty(properties, ClientProperties.LOG_HTTP_UPGRADE, Boolean.class, false);
代码示例来源:origin: org.glassfish.tyrus/tyrus-client
this.connectToServerUriParam = connectToServerUriParam;
MaskingKeyGenerator maskingKeyGenerator = Utils.getProperty(properties, ClientProperties
.MASKING_KEY_GENERATOR, MaskingKeyGenerator.class, null);
protocolHandler = DEFAULT_VERSION.createHandler(true, maskingKeyGenerator);
this.redirectEnabled = Utils.getProperty(properties, ClientProperties.REDIRECT_ENABLED, Boolean.class, false);
Integer redirectThreshold = Utils.getProperty(properties, ClientProperties.REDIRECT_THRESHOLD, Integer.class,
DEFAULT_REDIRECT_THRESHOLD);
if (redirectThreshold == null) {
Utils.getProperty(properties, ClientProperties.LOG_HTTP_UPGRADE, Boolean.class, false);
代码示例来源:origin: eclipse-ee4j/tyrus
private Map<String, String> getProxyHeaders(Map<String, Object> properties) throws DeploymentException {
Map<String, String> proxyHeaders = Utils.getProperty(properties, ClientProperties.PROXY_HEADERS, Map.class);
代码示例来源:origin: eclipse-ee4j/tyrus
private static Map<String, String> getProxyHeaders(Map<String, Object> properties) throws DeploymentException {
Map<String, String> proxyHeaders = Utils.getProperty(properties, ClientProperties.PROXY_HEADERS, Map.class);
代码示例来源:origin: org.glassfish.tyrus/tyrus-container-grizzly-client
private Map<String, String> getProxyHeaders(Map<String, Object> properties) throws DeploymentException {
Map<String, String> proxyHeaders = Utils.getProperty(properties, ClientProperties.PROXY_HEADERS, Map.class);
代码示例来源:origin: org.glassfish.tyrus/tyrus-container-grizzly-client
this.workerThreadPoolConfig = getWorkerThreadPoolConfig(properties);
this.selectorThreadPoolConfig =
Utils.getProperty(properties, GrizzlyClientProperties.SELECTOR_THREAD_POOL_CONFIG,
ThreadPoolConfig.class);
Boolean shared = Utils.getProperty(properties, ClientProperties.SHARED_CONTAINER, Boolean.class);
if (shared == null || !shared) {
Utils.getProperty(properties, ClientProperties.SHARED_CONTAINER_IDLE_TIMEOUT, Integer.class);
代码示例来源:origin: eclipse-ee4j/tyrus
this.workerThreadPoolConfig = getWorkerThreadPoolConfig(properties);
this.selectorThreadPoolConfig =
Utils.getProperty(properties, GrizzlyClientProperties.SELECTOR_THREAD_POOL_CONFIG,
ThreadPoolConfig.class);
Boolean shared = Utils.getProperty(properties, ClientProperties.SHARED_CONTAINER, Boolean.class);
if (shared == null || !shared) {
Utils.getProperty(properties, ClientProperties.SHARED_CONTAINER_IDLE_TIMEOUT, Integer.class);
代码示例来源:origin: eclipse-ee4j/tyrus
Utils.getProperty(properties, ClientProperties.WORKER_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
if (threadPoolConfig == null) {
threadPoolConfig = ThreadPoolConfig.defaultConfig();
Utils.getProperty(properties, ClientProperties.SHARED_CONTAINER_IDLE_TIMEOUT, Integer.class);
代码示例来源:origin: eclipse-ee4j/tyrus
Utils.getProperty(localProperties, TyrusWebSocketEngine.INCOMING_BUFFER_SIZE, Integer.class);
final ClusterContext clusterContext =
Utils.getProperty(localProperties, ClusterContext.CLUSTER_CONTEXT, ClusterContext.class);
final ApplicationEventListener applicationEventListener =
Utils.getProperty(localProperties, ApplicationEventListener.APPLICATION_EVENT_LISTENER,
ApplicationEventListener.class);
final Integer maxSessionsPerApp =
Utils.getProperty(localProperties, TyrusWebSocketEngine.MAX_SESSIONS_PER_APP, Integer.class);
final Integer maxSessionsPerRemoteAddr =
Utils.getProperty(localProperties, TyrusWebSocketEngine.MAX_SESSIONS_PER_REMOTE_ADDR, Integer.class);
final Boolean parallelBroadcastEnabled =
Utils.getProperty(localProperties, TyrusWebSocketEngine.PARALLEL_BROADCAST_ENABLED, Boolean.class);
final DebugContext.TracingType tracingType =
Utils.getProperty(localProperties, TyrusWebSocketEngine.TRACING_TYPE, DebugContext.TracingType.class,
DebugContext.TracingType.OFF);
final DebugContext.TracingThreshold tracingThreshold =
Utils.getProperty(localProperties, TyrusWebSocketEngine.TRACING_THRESHOLD,
DebugContext.TracingThreshold.class, DebugContext.TracingThreshold.TRACE);
代码示例来源:origin: org.glassfish.tyrus/tyrus-container-grizzly-client
private ThreadPoolConfig getWorkerThreadPoolConfig(Map<String, Object> properties) {
if (properties.containsKey(GrizzlyClientProperties.WORKER_THREAD_POOL_CONFIG)) {
return Utils
.getProperty(properties, GrizzlyClientProperties.WORKER_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
} else if (properties.containsKey(ClientProperties.WORKER_THREAD_POOL_CONFIG)) {
Object threadPoolConfig =
Utils.getProperty(properties, ClientProperties.WORKER_THREAD_POOL_CONFIG, Object.class);
代码示例来源:origin: eclipse-ee4j/tyrus
private ThreadPoolConfig getWorkerThreadPoolConfig(Map<String, Object> properties) {
if (properties.containsKey(GrizzlyClientProperties.WORKER_THREAD_POOL_CONFIG)) {
return Utils
.getProperty(properties, GrizzlyClientProperties.WORKER_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
} else if (properties.containsKey(ClientProperties.WORKER_THREAD_POOL_CONFIG)) {
Object threadPoolConfig =
Utils.getProperty(properties, ClientProperties.WORKER_THREAD_POOL_CONFIG, Object.class);
代码示例来源:origin: org.glassfish.tyrus/tyrus-client
Utils.getProperty(copiedProperties, ClientProperties.INCOMING_BUFFER_SIZE, Integer.class);
Integer wlsIncomingBufferSize = configuration == null
? null
: Utils.getProperty(configuration.getUserProperties(), ClientContainer.WLS_INCOMING_BUFFER_SIZE,
Integer.class);
final int incomingBufferSize;
Utils.getProperty(copiedProperties, ClientProperties.RETRY_AFTER_SERVICE_UNAVAILABLE,
Boolean.class, false);
final ReconnectHandler userReconnectHandler =
Utils.getProperty(copiedProperties, ClientProperties.RECONNECT_HANDLER, ReconnectHandler.class);
代码示例来源:origin: eclipse-ee4j/tyrus
Utils.getProperty(copiedProperties, ClientProperties.INCOMING_BUFFER_SIZE, Integer.class);
Integer wlsIncomingBufferSize = configuration == null
? null
: Utils.getProperty(configuration.getUserProperties(), ClientContainer.WLS_INCOMING_BUFFER_SIZE,
Integer.class);
final int incomingBufferSize;
Utils.getProperty(copiedProperties, ClientProperties.RETRY_AFTER_SERVICE_UNAVAILABLE,
Boolean.class, false);
final ReconnectHandler userReconnectHandler =
Utils.getProperty(copiedProperties, ClientProperties.RECONNECT_HANDLER, ReconnectHandler.class);
代码示例来源:origin: eclipse-ee4j/tyrus
Utils.getProperty(localProperties, WORKER_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
ThreadPoolConfig selectorThreadPoolConfig =
Utils.getProperty(localProperties, SELECTOR_THREAD_POOL_CONFIG, ThreadPoolConfig.class);
代码示例来源:origin: org.glassfish.tyrus/tyrus-client
AuthConfig authConfig = Utils.getProperty(properties, ClientProperties.AUTH_CONFIG,
AuthConfig.class,
AuthConfig.Builder.create().build());
代码示例来源:origin: eclipse-ee4j/tyrus
AuthConfig authConfig = Utils.getProperty(properties, ClientProperties.AUTH_CONFIG,
AuthConfig.class,
AuthConfig.Builder.create().build());
代码示例来源:origin: eclipse-ee4j/tyrus
Integer tyrusIncomingBufferSize = Utils.getProperty(properties, ClientProperties.INCOMING_BUFFER_SIZE,
Integer.class);
Integer wlsIncomingBufferSize = Utils.getProperty(endpointWrapper.getEndpointConfig().getUserProperties(),
ClientContainer.WLS_INCOMING_BUFFER_SIZE, Integer.class);
final Integer incomingBufferSize;
代码示例来源:origin: org.glassfish.tyrus/tyrus-client
Integer tyrusIncomingBufferSize = Utils.getProperty(properties, ClientProperties.INCOMING_BUFFER_SIZE,
Integer.class);
Integer wlsIncomingBufferSize = Utils.getProperty(endpointWrapper.getEndpointConfig().getUserProperties(),
ClientContainer.WLS_INCOMING_BUFFER_SIZE, Integer.class);
final Integer incomingBufferSize;
内容来源于网络,如有侵权,请联系作者删除!