Java 类retrofit.client.UrlConnectionClient 实例源码

项目:mobile_app_android    文件:RestServiceGenerator.java   
private static Client getClient() {

        return new UrlConnectionClient();
//    OkHttpClient client = new OkHttpClient();
//    client.setConnectTimeout(60, TimeUnit.SECONDS);
//    client.setWriteTimeout(60, TimeUnit.SECONDS);
//    client.setReadTimeout(60, TimeUnit.SECONDS);
//    return new OkClient(client);

    }
项目:java-runabove    文件:RunAboveBuilder.java   
/**
 * generic runabove creation manager function.
 *
 * @param consumerKey the consumer key
 * @return the ${e.g(1).rsfl()}
 */
public RunAboveManager createManager(String consumerKey) {

    RestAdapter restAdapterSigned = new RestAdapter.Builder()
            .setEndpoint(RUNABOVE_API_URL)
            .setErrorHandler(config.getExceptionHandler())
            .setClient(
                    new SigningClient(new UrlConnectionClient(), config.getApplicationKey(), config.getApplicationSecret(), consumerKey, config
                            .getExceptionHandler())).build();

    // and now all our request are signed and the service can be requested
    RunAboveManager serviceRunAbove = restAdapterSigned.create(RunAboveManager.class);
    return serviceRunAbove;
}
项目:brooklyn-ambari    文件:AmbariRestClient.java   
public AmbariRestClient() {
    client = new UrlConnectionClient(); //Default Retrofit client
}
项目:java-runabove    文件:RunAboveBuilder.java   
/**
 * generic internal signed client builder.
 *
 * @param consumerKey the consumer key
 * @return the signed client
 */
private SigningClient getSignedClient(String consumerKey) {
    return new SigningClient(new UrlConnectionClient(), config.getApplicationKey(), config.getApplicationSecret(), consumerKey,
            config.getExceptionHandler());
}
项目:java-runabove    文件:RunAboveBuilder.java   
/**
 * auth manager builder.
 *
 * @return the auth manager
 */
public AuthManager createAuthManager() {
    return createAuthManager(new CredentialClient(new UrlConnectionClient(), config.getApplicationKey(), config.getExceptionHandler()));
}