本文整理了Java中com.sun.jersey.api.client.Client.getProperties()
方法的一些代码示例,展示了Client.getProperties()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Client.getProperties()
方法的具体详情如下:
包路径:com.sun.jersey.api.client.Client
类名称:Client
方法名:getProperties
[英]Get the mutable property bag.
[中]获取可变属性包。
代码示例来源:origin: com.sun.jersey/jersey-bundle
/**
* Set if redirection should be performed or not.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_FOLLOW_REDIRECTS} on the property bag
* returned from {@link #getProperties}
*
* @param redirect if true then the client will automatically redirect
* to the URI declared in 3xx responses.
*/
public void setFollowRedirects(Boolean redirect) {
getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, redirect);
}
代码示例来源:origin: jersey/jersey-1.x
/**
* Set the connect timeout interval, in milliseconds.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_CONNECT_TIMEOUT} on the property bag
* returned from {@link #getProperties}
*
* @param interval the connect timeout interval. If null or 0 then
* an interval of infinity is declared.
*/
public void setConnectTimeout(Integer interval) {
getProperties().put(ClientConfig.PROPERTY_CONNECT_TIMEOUT, interval);
}
代码示例来源:origin: com.sun.jersey/jersey-bundle
/**
* Set the read timeout interval, in milliseconds.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_READ_TIMEOUT} on the property bag
* returned from {@link #getProperties}
*
* @param interval the read timeout interval. If null or 0 then
* an interval of infinity is declared.
*/
public void setReadTimeout(Integer interval) {
getProperties().put(ClientConfig.PROPERTY_READ_TIMEOUT, interval);
}
代码示例来源:origin: com.sun.jersey/jersey-bundle
/**
* Set the connect timeout interval, in milliseconds.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_CONNECT_TIMEOUT} on the property bag
* returned from {@link #getProperties}
*
* @param interval the connect timeout interval. If null or 0 then
* an interval of infinity is declared.
*/
public void setConnectTimeout(Integer interval) {
getProperties().put(ClientConfig.PROPERTY_CONNECT_TIMEOUT, interval);
}
代码示例来源:origin: com.sun.jersey/jersey-bundle
/**
* Set the client to send request entities using chunked encoding
* with a particular chunk size.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_CHUNKED_ENCODING_SIZE} on the property bag
* returned from {@link #getProperties}
*
* @param chunkSize the chunked encoding size. If <= 0 then the default
* size will be used. If null then chunked encoding will not be
* utilized.
*/
public void setChunkedEncodingSize(Integer chunkSize) {
getProperties().put(ClientConfig.PROPERTY_CHUNKED_ENCODING_SIZE, chunkSize);
}
代码示例来源:origin: jersey/jersey-1.x
/**
* Set if redirection should be performed or not.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_FOLLOW_REDIRECTS} on the property bag
* returned from {@link #getProperties}
*
* @param redirect if true then the client will automatically redirect
* to the URI declared in 3xx responses.
*/
public void setFollowRedirects(Boolean redirect) {
getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, redirect);
}
代码示例来源:origin: jersey/jersey-1.x
/**
* Set the read timeout interval, in milliseconds.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_READ_TIMEOUT} on the property bag
* returned from {@link #getProperties}
*
* @param interval the read timeout interval. If null or 0 then
* an interval of infinity is declared.
*/
public void setReadTimeout(Integer interval) {
getProperties().put(ClientConfig.PROPERTY_READ_TIMEOUT, interval);
}
代码示例来源:origin: jersey/jersey-1.x
/**
* Set the client to send request entities using chunked encoding
* with a particular chunk size.
*
* This method is the functional equivalent to setting the property
* {@link ClientConfig#PROPERTY_CHUNKED_ENCODING_SIZE} on the property bag
* returned from {@link #getProperties}
*
* @param chunkSize the chunked encoding size. If <= 0 then the default
* size will be used. If null then chunked encoding will not be
* utilized.
*/
public void setChunkedEncodingSize(Integer chunkSize) {
getProperties().put(ClientConfig.PROPERTY_CHUNKED_ENCODING_SIZE, chunkSize);
}
代码示例来源:origin: org.apache.apex/apex-engine
public WebServicesClient()
{
this(new DefaultClientConfig());
client.getProperties().put(ClientConfig.PROPERTY_FOLLOW_REDIRECTS, true);
client.getProperties().put(ClientConfig.PROPERTY_CONNECT_TIMEOUT, DEFAULT_CONNECT_TIMEOUT);
client.getProperties().put(ClientConfig.PROPERTY_READ_TIMEOUT, DEFAULT_READ_TIMEOUT);
}
代码示例来源:origin: com.emc.ecs/smart-client
public static Client createSmartClient(SmartConfig smartConfig,
ClientHandler clientHandler) {
Client client = createStandardClient(smartConfig, clientHandler);
// inject SmartFilter (this is the Jersey integration point of the load balancer)
client.addFilter(new SmartFilter(smartConfig));
// set up polling for updated host list (if polling is disabled in smartConfig or there's no host list provider,
// nothing will happen)
PollingDaemon pollingDaemon = new PollingDaemon(smartConfig);
pollingDaemon.start();
// attach the daemon thread to the client so users can stop it when finished with the client
client.getProperties().put(PollingDaemon.PROPERTY_KEY, pollingDaemon);
return client;
}
代码示例来源:origin: com.intuit.autumn/autumn-client
client.getProperties().put(PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, true);
LOGGER.info("Properties of the sun jersey client used by the application: {}", client.getProperties().toString());
代码示例来源:origin: com.intuit.data.autumn/autumn.client
client.getProperties().put(PROPERTY_BUFFER_RESPONSE_ENTITY_ON_EXCEPTION, true);
LOGGER.info("Properties of the sun jersey client used by the application: {}", client.getProperties().toString());
代码示例来源:origin: com.emc.ecs/smart-client
/**
* Destroy this client. Any system resources associated with the client
* will be cleaned up.
* <p>
* This method must be called when there are not responses pending otherwise
* undefined behavior will occur.
* <p>
* The client must not be reused after this method is called otherwise
* undefined behavior will occur.
*/
public static void destroy(Client client) {
PollingDaemon pollingDaemon = (PollingDaemon) client.getProperties().get(PollingDaemon.PROPERTY_KEY);
if (pollingDaemon != null) {
log.debug("terminating polling daemon");
pollingDaemon.terminate();
if (pollingDaemon.getSmartConfig().getHostListProvider() != null) {
log.debug("destroying host list provider");
pollingDaemon.getSmartConfig().getHostListProvider().destroy();
}
}
log.debug("destroying Jersey client");
client.destroy();
}
代码示例来源:origin: com.intuit.autumn/autumn-client
client.getProperties().toString());
代码示例来源:origin: com.intuit.data.autumn/autumn.client
client.getProperties().toString());
代码示例来源:origin: com.sun.jersey/jersey-bundle
getProperties().putAll(config.getProperties());
代码示例来源:origin: jersey/jersey-1.x
getProperties().putAll(config.getProperties());
内容来源于网络,如有侵权,请联系作者删除!