public class RemoteApiOptions
extends java.lang.Object
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 and Description |
---|
RemoteApiOptions() |
Modifier and Type | Method and Description |
---|---|
RemoteApiOptions |
copy() |
RemoteApiOptions |
credentials(java.lang.String newUserEMail,
java.lang.String newPassword)
Deprecated.
Use
useApplicationDefaultCredential() or
useServiceAccountCredential instead. |
RemoteApiOptions |
datastoreQueryFetchSize(int newValue)
When executing a datastore query, this is the number of results to fetch
per HTTP request.
|
java.lang.String |
getCredentialsToReuse() |
int |
getDatastoreQueryFetchSize() |
java.lang.String |
getHostname() |
int |
getMaxConcurrentRequests() |
int |
getMaxHttpResponseSize() |
java.lang.String |
getPassword() |
int |
getPort() |
java.lang.String |
getRemoteApiPath() |
java.lang.String |
getUserEmail() |
RemoteApiOptions |
maxConcurrentRequests(int newValue)
This parameter controls the maximum number of async API requests that will be
in flight at once.
|
RemoteApiOptions |
maxHttpResponseSize(int newValue)
When making a remote call, this is the maximum size of the HTTP response.
|
RemoteApiOptions |
remoteApiPath(java.lang.String newPath)
Sets the path used to access the remote API.
|
RemoteApiOptions |
reuseCredentials(java.lang.String newUserEmail,
java.lang.String serializedCredentials)
Reuses credentials from another AppEngineClient.
|
RemoteApiOptions |
server(java.lang.String newHostname,
int newPort)
Sets the host and port port where we will connect.
|
RemoteApiOptions |
useApplicationDefaultCredential()
Use a Google Application Default credential for authentication.
|
RemoteApiOptions |
useComputeEngineCredential()
Deprecated.
|
RemoteApiOptions |
useDevelopmentServerCredential()
Use credentials appropriate for talking to the Development Server.
|
RemoteApiOptions |
useServiceAccountCredential(java.lang.String serviceAccountId,
java.security.PrivateKey privateKey)
Use a service account credential.
|
RemoteApiOptions |
useServiceAccountCredential(java.lang.String serviceAccountId,
java.lang.String p12PrivateKeyFile)
Use a service account credential.
|
public RemoteApiOptions server(java.lang.String newHostname, int newPort)
@Deprecated public RemoteApiOptions credentials(java.lang.String newUserEMail, java.lang.String newPassword)
useApplicationDefaultCredential()
or
useServiceAccountCredential
instead.public RemoteApiOptions reuseCredentials(java.lang.String newUserEmail, java.lang.String serializedCredentials)
newUserEmail
- the email address of the user we want to log in as.serializedCredentials
- a string returned by calling
AppEngineClient.serializeCredentials()
on the previous client@Deprecated public RemoteApiOptions useComputeEngineCredential()
useApplicationDefaultCredential()
.RemoteApiOptions
instancepublic RemoteApiOptions useApplicationDefaultCredential()
RemoteApiOptions
instance.public RemoteApiOptions useServiceAccountCredential(java.lang.String serviceAccountId, java.lang.String p12PrivateKeyFile)
serviceAccountId
- service account ID (typically an e-mail address)p12PrivateKeyFile
- p12 file containing a private key to use with the service accountRemoteApiOptions
instancepublic RemoteApiOptions useServiceAccountCredential(java.lang.String serviceAccountId, java.security.PrivateKey privateKey)
serviceAccountId
- service account ID (typically an e-mail address)privateKey
- private key to use with the service accountRemoteApiOptions
instancepublic RemoteApiOptions useDevelopmentServerCredential()
RemoteApiOptions
instancepublic RemoteApiOptions remoteApiPath(java.lang.String newPath)
public RemoteApiOptions maxConcurrentRequests(int newValue)
public RemoteApiOptions datastoreQueryFetchSize(int newValue)
(This value can be overridden by the code using the datastore API.)
public RemoteApiOptions maxHttpResponseSize(int newValue)
public RemoteApiOptions copy()
public java.lang.String getHostname()
public int getPort()
public java.lang.String getUserEmail()
public java.lang.String getPassword()
public java.lang.String getCredentialsToReuse()
public java.lang.String getRemoteApiPath()
public int getMaxConcurrentRequests()
public int getDatastoreQueryFetchSize()
public int getMaxHttpResponseSize()