Class RemoteApiOptions
java.lang.Object
com.google.appengine.tools.remoteapi.RemoteApiOptions
A mutable object containing settings for installing the remote API.
Example for connecting to a development app server:
RemoteApiOptions options = new RemoteApiOptions()
.server("localhost", 8888),
.useDevelopmentServerCredential();
Example for connecting to a deployed app:
RemoteApiOptions options = new RemoteApiOptions()
.server("myappid.appspot.com", 443),
.useApplicationDefaultCredential();
The options should be passed to RemoteApiInstaller.install(com.google.appengine.tools.remoteapi.RemoteApiOptions).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()credentials(String newUserEMail, String newPassword) Deprecated.datastoreQueryFetchSize(int newValue) When executing a datastore query, this is the number of results to fetch per HTTP request.intintintintgetPort()maxConcurrentRequests(int newValue) This parameter controls the maximum number of async API requests that will be in flight at once.maxHttpResponseSize(int newValue) When making a remote call, this is the maximum size of the HTTP response.remoteApiPath(String newPath) Sets the path used to access the remote API.reuseCredentials(String newUserEmail, String serializedCredentials) Reuses credentials from another AppEngineClient.Sets the host and port port where we will connect.useAccessToken(String accessToken) Use an access token credential.Use a Google Application Default credential for authentication.Deprecated.Use credentials appropriate for talking to the Development Server.useServiceAccountCredential(String serviceAccountId, String p12PrivateKeyFile) Use a service account credential.useServiceAccountCredential(String serviceAccountId, PrivateKey privateKey) Use a service account credential.
-
Constructor Details
-
RemoteApiOptions
public RemoteApiOptions()
-
-
Method Details
-
server
Sets the host and port port where we will connect. -
credentials
Deprecated.Sets a username and password to be used for logging in via the ClientLogin API. Overrides any previously-provided credentials. -
reuseCredentials
Reuses credentials from another AppEngineClient. Credentials can only be reused from a client with the same hostname and user. Overrides any previously-provided credentials.- Parameters:
newUserEmail- the email address of the user we want to log in as.serializedCredentials- a string returned by callingRemoteApiClient.serializeCredentials()on the previous client
-
useComputeEngineCredential
Deprecated.Use a Compute Engine credential for authentication. Overrides any previously-provided credentials.- Returns:
- this
RemoteApiOptionsinstance
-
useApplicationDefaultCredential
Use a Google Application Default credential for authentication. Overrides any previously-provided credentials.- Returns:
- this
RemoteApiOptionsinstance. - See Also:
-
useServiceAccountCredential
public RemoteApiOptions useServiceAccountCredential(String serviceAccountId, String p12PrivateKeyFile) Use a service account credential. Overrides any previously-provided credentials.- Parameters:
serviceAccountId- service account ID (typically an e-mail address)p12PrivateKeyFile- p12 file containing a private key to use with the service account- Returns:
- this
RemoteApiOptionsinstance
-
useServiceAccountCredential
Use a service account credential. Overrides any previously-provided credentials.- Parameters:
serviceAccountId- service account ID (typically an e-mail address)privateKey- private key to use with the service account- Returns:
- this
RemoteApiOptionsinstance
-
useAccessToken
Use an access token credential. Overrides any previously-provided credentials.- Parameters:
accessToken- the access token (generally fromCredential.getAccessToken())- Returns:
- this
RemoteApiOptionsinstance
-
useDevelopmentServerCredential
Use credentials appropriate for talking to the Development Server. Overrides any previously-provided credentials.- Returns:
- this
RemoteApiOptionsinstance
-
remoteApiPath
Sets the path used to access the remote API. If not set, the default is /remote_api. -
maxConcurrentRequests
This parameter controls the maximum number of async API requests that will be in flight at once. Each concurrent request will likely be handled by a separate instance of your App. Having more instances increases throughput but may result in errors due to exceeding quota. Defaults to 5. -
datastoreQueryFetchSize
When executing a datastore query, this is the number of results to fetch per HTTP request. Increasing this value will reduce the number of round trips when running large queries, but too high a value can be wasteful when not all results are needed. Defaults to 500.(This value can be overridden by the code using the datastore API.)
-
maxHttpResponseSize
When making a remote call, this is the maximum size of the HTTP response. The default is 33M. Normally there's no reason to change this. This setting has no effect when running in an App Engine container. -
copy
-
getHostname
-
getPort
public int getPort() -
getUserEmail
-
getPassword
-
getCredentialsToReuse
-
getRemoteApiPath
-
getMaxConcurrentRequests
public int getMaxConcurrentRequests() -
getDatastoreQueryFetchSize
public int getDatastoreQueryFetchSize() -
getMaxHttpResponseSize
public int getMaxHttpResponseSize()
-
useApplicationDefaultCredential()oruseServiceAccountCredential(java.lang.String,java.lang.String)instead.