USER_AGENT
The USER_AGENT
element sets a timeout to handle the user agent
connection.
Syntax
<USER_AGENT>seconds</USER_AGENT>
- seconds specifies the number of seconds to wait for a client request.
Child elements
There are no child elements.
Usage
You set this timeout to specify a timeout in number of seconds that the GAS is to wait for a client request before assuming that the front-end has died or that there has been a network failure.
Under normal operation, the front-end sends a GET
request to the GAS immediately after receiving a response. The
client-side front-end (CSF) will also send keep-alive requests (/ua/ka) to keep
the application alive in the case of user inactivity.
If the client has not sent a request to the GAS before the USER_AGENT
timeout expires, it
is assumed that the front-end client has died and an instruction is sent to the application's DVM to
shut down.
The USER_AGENT
timeout proves to be particularly useful with the Genero web
client. As with the other front-ends, when a user properly exits an application, the DVM handling
that application is properly shut down.
When the user does not properly exit the application, the DVM remains alive even though the
front-end has died. This can occur when a user closes the browser instead of properly exiting the
application; the front-end client has no mechanism to indicate to the GAS that the user has
closed the browser. With the USER_AGENT
timeout, the GAS closes the socket
to the DVM, which causes the DVM to shut down.
Usage example
<USER_AGENT>300</USER_AGENT>
In this example, the USER_AGENT
timeout is set to 300 seconds.