public class ServiceContext
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_API_NAME
API name to use when it is not provided or inferred.
|
static java.lang.String |
DEFAULT_APP_NAME
Application name to use when it is not provided or inferred.
|
| Modifier and Type | Method and Description |
|---|---|
static ServiceContext |
create()
Creates a service context with default application and API name.
|
static ServiceContext |
create(java.lang.String applicationId,
java.lang.String apiName)
Creates a service context with a given default application and API name.
|
static ServiceContext |
createFromHostname(java.lang.String hostname,
java.lang.String apiName) |
java.lang.String |
getAppHostname() |
java.lang.String |
getDefaultApiName() |
java.lang.String |
getTransferProtocol() |
public static final java.lang.String DEFAULT_API_NAME
public static final java.lang.String DEFAULT_APP_NAME
public static ServiceContext create()
public static ServiceContext create(java.lang.String applicationId, java.lang.String apiName)
applicationId - Default application id to use. Format is either "<appName>" or
"google.com:<appName>", where the host name of the former is
"<appName>.appspot.com" and ther latter is "<appName>.googleplex.com".apiName - Default API name to use.public static ServiceContext createFromHostname(java.lang.String hostname, java.lang.String apiName)
public java.lang.String getDefaultApiName()
public java.lang.String getAppHostname()
public java.lang.String getTransferProtocol()