This class provides easy methods to connect to the JET Request Response and Notification servers and to access all the JET services.

Method OpenRequestResponseSession Create a request response session with the JET server. Raises exception due to Thrift exceptions or SSL certificate is missing or user credentials are not valid.
Method OpenNotificationSession Create a request response session with the JET server. Raises exception in case of invalid arguments or when JET notification server is not accessible.
Method CloseNotificationSession This method closes the JET Notification channel.
Method GetNotificationService This method will return object that will provide access to notification service methods.
Method GetService This method will return object that will provide access to requested service methods.
Method CloseRequestResponseSession This method will close the communication channel between client and JET server.
def OpenRequestResponseSession(self, transport_type=DEVICE_DEFAULT_TRANSPORT, device=DEVICE_DEFAULT_IP, port=DEVICE_DEFAULT_PORT, timeout=None, ca_certs=None, user=None, password=None):

Create a request response session with the JET server. Raises exception due to Thrift exceptions or SSL certificate is missing or user credentials are not valid.

Parameterstransport_typeThrift transport channel. Default is TLS
deviceJET server IP address. Default is localhost
portJET server port number. Default is 9090
timeoutTimeout parameter in seconds. Default is None
ca_certsCertificate path needed for the SSL based transport
userUsername on the JET server
passwordPassword to access the JET server.
ReturnsJET request response object
def OpenNotificationSession(self, device=DEFAULT_MQTT_IP, port=DEFAULT_MQTT_PORT, user=None, password=None, tls=None, keepalive=DEFAULT_MQTT_TIMEOUT):

Create a request response session with the JET server. Raises exception in case of invalid arguments or when JET notification server is not accessible.

ParametersdeviceJET Server IP address. Default is localhost
portJET Notification port number. Default is 1883
userUsername on the JET server, used for authentication and authorization.
passwordPassword to access the JET server, used for authentication and authorization.
keepaliveMaximum period in seconds between communications with the broker. Default is 60.
ReturnsJET Notification object.
def CloseNotificationSession(self):

This method closes the JET Notification channel.

def GetNotificationService(self):

This method will return object that will provide access to notification service methods.

def GetService(self, service_name):

This method will return object that will provide access to requested service method.

def CloseRequestResponseSession(self):

This method will close the communication channel between client and JET server.

Default Values:
DEFAULT_MQTT_IP = '127.0.0.1'
DEFAULT_MQTT_PORT = 1883
DEFAULT_MQTT_TIMEOUT = 60
DEVICE_DEFAULT_IP = '127.0.0.1'
DEVICE_DEFAULT_PORT = 9090
DEVICE_DEFAULT_TRANSPORT = None
DEVICE_TLS_TRANSPORT = 'tls'