Skip to main content
Version: 7.9

system.util.getGatewayStatus

This function is used in Python Scripting.

Description

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.

Client Permission Restrictions

This scripting function has no Client Permission restrictions.

Syntax

system.util.getGatewayStatus(gatewayAddress, connectTimeoutMillis, socketTimeoutMillis)

Parameters

TypeParameterDescription
StringgatewayAddressThe Gateway address to ping, in the form of ADDR:PORT/main.
IntegerconnectTimeoutMillisOptional. The maximum time in milliseconds to attempt to initially contact a Gateway.
IntegersocketTimeoutMillisOptional. 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

Code Examples

Example #1
def checkRemoteGateway():

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)