本文整理匯總了Java中com.yammer.dropwizard.client.JerseyClientBuilder類的典型用法代碼示例。如果您正苦於以下問題:Java JerseyClientBuilder類的具體用法?Java JerseyClientBuilder怎麽用?Java JerseyClientBuilder使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
JerseyClientBuilder類屬於com.yammer.dropwizard.client包,在下文中一共展示了JerseyClientBuilder類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: run
import com.yammer.dropwizard.client.JerseyClientBuilder; //導入依賴的package包/類
@Override
public void run(ExampleConfiguration configuration, Environment environment) throws Exception {
Client client = new JerseyClientBuilder().using(environment).build();
environment.addResource(new ProxyResource(client));
environment.addResource(new TracedResource());
}
示例2: buildGithubHttpClient
import com.yammer.dropwizard.client.JerseyClientBuilder; //導入依賴的package包/類
private Client buildGithubHttpClient(final ChanceryConfig config,
final Environment env) {
return new JerseyClientBuilder().
using(config.getGithubHttpConfig()).
using(env).build();
}