@Test public void makeClient_WithTransport() { NetHttpTransport transport = new NetHttpTransport(); DatastoreOptions options = new DatastoreOptions.Builder() .projectId(PROJECT_ID) .transport(transport) .build(); HttpRequestFactory f = factory.makeClient(options); assertEquals(transport, f.getTransport()); }
public HttpRequestFactory makeClient(DatastoreOptions options) { Credential credential = options.getCredential(); HttpTransport transport = options.getTransport(); if (transport == null) { transport = credential == null ? new NetHttpTransport() : credential.getTransport(); transport = transport == null ? new NetHttpTransport() : transport; } return transport.createRequestFactory(credential); }
DatastoreFactory { public HttpRequestFactory makeClient(DatastoreOptions options) { Credential credential = options.getCredential(); HttpTransport transport = options.getTransport(); if (transport == null) { transport = credential == null ? new NetHttpTransport() : credential.getTransport(); transport = transport == null ? new NetHttpTransport() : transport; } return transport.createRequestFactory(credential); } }
DatastoreFactory { public HttpRequestFactory makeClient(DatastoreOptions options) { Credential credential = options.getCredential(); HttpTransport transport = options.getTransport(); if (transport == null) { transport = credential == null ? new NetHttpTransport() : credential.getTransport(); transport = transport == null ? new NetHttpTransport() : transport; } return transport.createRequestFactory(credential); }  }
DatastoreFactory { public HttpRequestFactory makeClient(DatastoreOptions options) { Credential credential = options.getCredential(); HttpTransport transport = options.getTransport(); if (transport == null) { transport = credential == null ? new NetHttpTransport() : credential.getTransport(); transport = transport == null ? new NetHttpTransport() : transport; } return transport.createRequestFactory(credential); }  static DatastoreFactory get(); Datastore create(DatastoreOptions options); HttpRequestFactory makeClient(DatastoreOptions options); static void logMethodCalls(); }
DatastoreFactory { public HttpRequestFactory makeClient(DatastoreOptions options) { Credential credential = options.getCredential(); HttpTransport transport = options.getTransport(); if (transport == null) { transport = credential == null ? new NetHttpTransport() : credential.getTransport(); transport = transport == null ? new NetHttpTransport() : transport; } return transport.createRequestFactory(credential); }  static DatastoreFactory get(); Datastore create(DatastoreOptions options); HttpRequestFactory makeClient(DatastoreOptions options); static void logMethodCalls(); static final String VERSION; static final String DEFAULT_HOST; }