|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 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.
Field Summary | |
---|---|
static java.lang.String |
BACKEND_ID_ENV_ATTRIBUTE
Environment attribute key where the backend name is stored. |
static java.lang.String |
DEVAPPSERVER_PORTMAPPING_KEY
|
static java.lang.String |
INSTANCE_ID_ENV_ATTRIBUTE
Environment attribute key where the instance id is stored. |
static java.lang.String |
REQUEST_HEADER_BACKEND_REDIRECT
|
static java.lang.String |
REQUEST_HEADER_INSTANCE_REDIRECT
|
Method Summary | |
---|---|
java.lang.String |
getBackendAddress(java.lang.String backend)
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)
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()
Get the name of the backend handling the current request. |
int |
getCurrentInstance()
Get the instance handling the current request. |
Field Detail |
---|
static final java.lang.String REQUEST_HEADER_BACKEND_REDIRECT
static final java.lang.String REQUEST_HEADER_INSTANCE_REDIRECT
static final java.lang.String INSTANCE_ID_ENV_ATTRIBUTE
getCurrentInstance()
,
Constant Field Valuesstatic final java.lang.String BACKEND_ID_ENV_ATTRIBUTE
getCurrentBackend()
,
Constant Field Valuesstatic final java.lang.String DEVAPPSERVER_PORTMAPPING_KEY
Method Detail |
---|
java.lang.String getCurrentBackend()
int getCurrentInstance()
java.lang.String getBackendAddress(java.lang.String backend)
backend
- The name of the backend
java.lang.String getBackendAddress(java.lang.String backend, int instance)
backend
- The name of the backendinstance
- The instance id
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |