Service¶
Service class implements the server side part of the DISET protocol There are 2 main parts in this class:
All useful functions for initialization
All useful functions to handle the requests
- class DIRAC.Core.DISET.private.Service.Service(serviceData)¶
Bases:
object
- SVC_SECLOG_CLIENT = <DIRAC.FrameworkSystem.Client.SecurityLogClient.SecurityLogClient object>¶
- SVC_VALID_ACTIONS = {'Connection': 'Message', 'FileTransfer': 'transfer', 'Message': 'msg', 'RPC': 'export'}¶
- __init__(serviceData)¶
Init the variables for the service
- Parameters
serviceData –
dict with modName, standalone, loadName, moduleObj, classObj. e.g.: {‘modName’: ‘Framework/serviceName’, ‘standalone’: True, ‘loadName’: ‘Framework/serviceName’, ‘moduleObj’: <module ‘serviceNameHandler’ from ‘/home/DIRAC/FrameworkSystem/Service/serviceNameHandler.pyo’>, ‘classObj’: <class ‘serviceNameHandler.serviceHandler’>}
Standalone is true if there is only one service started If it’s false, every service is linked to a different MonitoringClient
- getConfig()¶
- handleConnection(clientTransport)¶
This method may be called by ServiceReactor. The method stacks openened connection in a queue, another thread read this queue and handle connection.
- Parameters
clientTransport – Object which describes opened connection (PlainTransport or SSLTransport)
- initialize()¶
- setCloneProcessId(cloneId)¶
- property wantsThrottle¶
Boolean property for if the service wants requests to stop being accepted