Java 8 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Java 8
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Java
8 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Java.
BackendService (Google App Engine API for Java)
Stay organized with collections
Save and categorize content based on your preferences.
-
Deprecated.
@Deprecated
public interface BackendService
BackendService
allows you to retrieve information about
backend servers. Backend servers are long running addressable
servers that can be used for applications that need to keep
persistent state in ram between requests.
This API is deprecated and has been replaced by
ModulesService
. Please update your code as soon as
possible. See the modules documentation for more information:
https://developers.google.com/appengine/docs/java/modules/converting
This API allows you to retrieve information about the backend
handling the current request. It also allows you to to get the
address of a specific backend instance in such a way that a local
server is used during development and a production server is used
in production.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods
Modifier and Type |
Method and Description |
java.lang.String |
getBackendAddress(java.lang.String backend)
Deprecated.
Get the address of a specific backend in such a way that a local server is
used during development and a production server is used in production.
|
java.lang.String |
getBackendAddress(java.lang.String backend,
int instance)
Deprecated.
Get the address of a specific backend instance in such a way that a local
instance is used during development and a production server instance is
used in production.
|
java.lang.String |
getCurrentBackend()
Deprecated.
Get the name of the backend handling the current request.
|
int |
getCurrentInstance()
Deprecated.
Get the instance handling the current request.
|
-
-
Field Detail
-
static final java.lang.String REQUEST_HEADER_BACKEND_REDIRECT
Deprecated.
- See Also:
- Constant Field Values
-
static final java.lang.String REQUEST_HEADER_INSTANCE_REDIRECT
Deprecated.
- See Also:
- Constant Field Values
-
DEVAPPSERVER_PORTMAPPING_KEY
static final java.lang.String DEVAPPSERVER_PORTMAPPING_KEY
Deprecated.
- See Also:
- Constant Field Values
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eBackendService\u003c/code\u003e interface is deprecated and has been replaced by \u003ccode\u003eModulesService\u003c/code\u003e, urging developers to update their code.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eBackendService\u003c/code\u003e previously allowed retrieval of information about backend servers, which were long-running and could maintain persistent state between requests.\u003c/p\u003e\n"],["\u003cp\u003eThis API allowed users to get the address of a specified backend instance, using a local server during development and a production server when in production.\u003c/p\u003e\n"],["\u003cp\u003eThe interface included methods to determine the backend name (\u003ccode\u003egetCurrentBackend\u003c/code\u003e) and instance ID (\u003ccode\u003egetCurrentInstance\u003c/code\u003e) handling the current request.\u003c/p\u003e\n"],["\u003cp\u003eSeveral static fields are also described but are all deprecated including \u003ccode\u003eBACKEND_ID_ENV_ATTRIBUTE\u003c/code\u003e, \u003ccode\u003eDEVAPPSERVER_PORTMAPPING_KEY\u003c/code\u003e, \u003ccode\u003eINSTANCE_ID_ENV_ATTRIBUTE\u003c/code\u003e, \u003ccode\u003eREQUEST_HEADER_BACKEND_REDIRECT\u003c/code\u003e, and \u003ccode\u003eREQUEST_HEADER_INSTANCE_REDIRECT\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# BackendService (Google App Engine API for Java)\n\ncom.google.appengine.api.backends\n\nInterface BackendService\n------------------------\n\n-\n\n *** ** * ** ***\n\n Deprecated.\n\n ```\n @Deprecated\n public interface BackendService\n ``` \n [`BackendService`](../../../../../com/google/appengine/api/backends/BackendService.html \"interface in com.google.appengine.api.backends\") allows you to retrieve information about backend servers. Backend servers are long running addressable servers that can be used for applications that need to keep persistent state in ram between requests.\n\n\n This API is deprecated and has been replaced by\n [`ModulesService`](../../../../../com/google/appengine/api/modules/ModulesService.html \"interface in com.google.appengine.api.modules\"). Please update your code as soon as\n possible. See the modules documentation for more information:\n https://developers.google.com/appengine/docs/java/modules/converting\n\n\n This API allows you to retrieve information about the backend\n handling the current request. It also allows you to to get the\n address of a specific backend instance in such a way that a local\n server is used during development and a production server is used\n in production.\n\n \u003cbr /\u003e\n\n-\n -\n\n ### Field Summary\n\n \u003c!-- --\u003e\n\n -\n\n ### Method Summary\n\n-\n -\n\n ### Field Detail\n\n\n -\n\n #### REQUEST_HEADER_BACKEND_REDIRECT\n\n ```\n static final java.lang.String REQUEST_HEADER_BACKEND_REDIRECT\n ``` \n Deprecated.\n\n See Also:\n : [Constant Field Values](../../../../../constant-values.html#com.google.appengine.api.backends.BackendService.REQUEST_HEADER_BACKEND_REDIRECT)\n\n\n -\n\n #### REQUEST_HEADER_INSTANCE_REDIRECT\n\n ```\n static final java.lang.String REQUEST_HEADER_INSTANCE_REDIRECT\n ``` \n Deprecated.\n\n See Also:\n : [Constant Field Values](../../../../../constant-values.html#com.google.appengine.api.backends.BackendService.REQUEST_HEADER_INSTANCE_REDIRECT)\n\n\n -\n\n #### INSTANCE_ID_ENV_ATTRIBUTE\n\n ```\n static final java.lang.String INSTANCE_ID_ENV_ATTRIBUTE\n ``` \n Deprecated. \n Environment attribute key where the instance id is stored.\n\n See Also:\n : [`getCurrentInstance()`](../../../../../com/google/appengine/api/backends/BackendService.html#getCurrentInstance--),\n [Constant Field Values](../../../../../constant-values.html#com.google.appengine.api.backends.BackendService.INSTANCE_ID_ENV_ATTRIBUTE)\n\n\n -\n\n #### BACKEND_ID_ENV_ATTRIBUTE\n\n ```\n static final java.lang.String BACKEND_ID_ENV_ATTRIBUTE\n ``` \n Deprecated. \n Environment attribute key where the backend name is stored.\n\n See Also:\n : [`getCurrentBackend()`](../../../../../com/google/appengine/api/backends/BackendService.html#getCurrentBackend--),\n [Constant Field Values](../../../../../constant-values.html#com.google.appengine.api.backends.BackendService.BACKEND_ID_ENV_ATTRIBUTE)\n\n\n -\n\n #### DEVAPPSERVER_PORTMAPPING_KEY\n\n ```\n static final java.lang.String DEVAPPSERVER_PORTMAPPING_KEY\n ``` \n Deprecated.\n\n See Also:\n : [Constant Field Values](../../../../../constant-values.html#com.google.appengine.api.backends.BackendService.DEVAPPSERVER_PORTMAPPING_KEY)\n\n \u003c!-- --\u003e\n\n -\n\n ### Method Detail\n\n\n -\n\n #### getCurrentBackend\n\n ```\n java.lang.String getCurrentBackend()\n ``` \n Deprecated. \n Get the name of the backend handling the current request.\n\n Returns:\n : The name of the backend or null if the request is not handled by a\n backend.\n\n\n -\n\n #### getCurrentInstance\n\n ```\n int getCurrentInstance()\n ``` \n Deprecated. \n Get the instance handling the current request.\n\n Returns:\n : The instance id or -1 if the request is not handled by a backend.\n\n\n -\n\n #### getBackendAddress\n\n ```\n java.lang.String getBackendAddress(java.lang.String backend)\n ``` \n Deprecated. \n Get the address of a specific backend in such a way that a local server is used during development and a production server is used in production.\n\n Parameters:\n : `backend` - The name of the backend\n\n Returns:\n : The address of the backend\n\n\n -\n\n #### getBackendAddress\n\n ```\n java.lang.String getBackendAddress(java.lang.String backend,\n int instance)\n ``` \n Deprecated. \n Get the address of a specific backend instance in such a way that a local instance is used during development and a production server instance is used in production.\n\n Parameters:\n : `backend` - The name of the backend\n : `instance` - The instance id\n\n Returns:\n : The address of the backend instance"]]