system.util.getGatewayStatus
Returns a string that indicates the status of the Gateway. A status of RUNNING means that the Gateway is fully functional. Thrown exceptions return "ERROR" with the error message appended to the string. This function can be used to test all 7.7 and later Gateways. The function can also be used to test 7.6 (7.6.4 and later) and 7.5 (7.5.11 and later) Gateways. Attempting to test Gateways older than these versions will return errors.
system.util. getGatewayStatus( gatewayAddress, connectTimeoutMillis, socketTimeoutMillis )
-
Parameters
String gatewayAddress - The gateway address to ping, in the form of ADDR:PORT/main.
Integer connectTimeoutMillis - Optional. The maximum time in milliseconds to attempt to initially contact a Gateway.
Integer socketTimeoutMillis - Optional. The maximum time in milliseconds to wait for a response from a Gateway after initial connection has been established.
-
Returns
String - A string that indicates the status of the Gateway. A status of RUNNING means that the Gateway is fully functional.
-
Scope
Client
def
checkRemoteGateway():
import
system
status
=
system.util.getGatewayStatus(
"10.20.6.253:8088/main"
)
if
status
=
=
"RUNNING"
:
print
"Central Gateway is available!"
else
:
print
"Error: "
+
status
# It's important to do this as an asynchronous operation, as the method
# may block for some time.
system.util.invokeAsynchronous(checkRemoteGateway)