def setup (app): legexpapi = XMLRPCHandler('legacyexpedientapi') legexpapi.connect(app, '/core/legacyexpedientapi/xmlrpc/') #legexpapi = AMLegExpAPI(app) legexpapi.register_instance(AMLegExpAPI(app.logger)) app.logger.info("[LegacyExpedientAPI] Loaded.") return legexpapi
def setup(app): handler = XMLRPCHandler('XMLRPC') handler.connect(app, '/RPC2') handler.connect(app, '/XMLRPC') handler.register_instance(NipapXMLRPC()) return app
def setup(app): legexpapi = XMLRPCHandler('legacyexpedientapi') legexpapi.connect(app, '/core/legacyexpedientapi/xmlrpc/') #legexpapi = AMLegExpAPI(app) legexpapi.register_instance(AMLegExpAPI(app.logger)) app.logger.info("[LegacyExpedientAPI] Loaded.") return legexpapi
def registerXMLRPC(self, unique_service_name, instance, endpoint): """Register the receiver. {unique_service_name} just has to be a unique name (dont ask why). The {instance} is an object (an {Dispatcher} instance) providing the methods which get called via the XMLRPC enpoint. {endpoint} is the mounting point for the XML RPC interface (e.g. '/geni' ).""" handler = XMLRPCHandler(unique_service_name) handler.connect(self._flaskapp.app, endpoint) handler.register_instance(instance)
def setup(): app = Flask('nipap.xmlrpc') Compress(app) handler = XMLRPCHandler('XMLRPC') handler.connect(app, '/RPC2') handler.connect(app, '/XMLRPC') handler.register_instance(NipapXMLRPC()) return app
flask_app.logger.addHandler(logging.FileHandler(_log_file)) for _config in ["LOG_PATH","DATA_PATH","PROJECT_PATH","HISTORY_PATH"]: flask_app.config[_config] = coreapp.config[_config] flask_app.config["coreapp"] = coreapp flask_app.config["scheduler"] = coreapp.scheduler #flask_app.config["db_session"] = coreapp.config.get("db_session") from .proxy import SchedulerProxy _handler = XMLRPCHandler('api') _scheduler_proxy = SchedulerProxy(flask_app) _handler.register_instance(_scheduler_proxy) _handler.connect(flask_app, '/api') flask_app.config["scheduler_proxy"] = _scheduler_proxy from apscheduler.schedulers.tornado import TornadoScheduler import os # The "apscheduler." prefix is hard coded apscheduler = TornadoScheduler({ 'apscheduler.jobstores.default': { 'type': 'sqlalchemy', 'url': 'sqlite:///'+os.path.join(flask_app.config["DATA_PATH"],"apscheduler.db") }, 'apscheduler.job_defaults.coalesce': 'true',
def setup(app): sfa_api = XMLRPCHandler("sfaapi") sfa_api.connect(app, "/sfa/2/") sfa_api.register_instance(SfaApi(app.logger)) app.logger.info("[SfaApi] Loaded.") return sfa_api
def setup (app): gapi2 = XMLRPCHandler('gapi2') gapi2.connect(app, '/foam/gapi/2') gapi2.register_instance(AMAPIv2(app.logger)) app.logger.info("[GAPIv2] Loaded.") return gapi2
def setup(app): sfa_api = XMLRPCHandler('sfaapi') sfa_api.connect(app, '/sfa/2/') sfa_api.register_instance(SfaApi(app.logger)) app.logger.info("[SfaApi] Loaded.") return sfa_api
def setup (app): gapi1 = XMLRPCHandler('gapi1') gapi1.connect(app, '/foam/gapi/1') gapi1.register_instance(AMAPIv1(app.logger)) app.logger.info("[GAPIv1] Loaded.") return gapi1
def setup(app): gapi2 = XMLRPCHandler('gapi2') gapi2.connect(app, '/foam/gapi/2') gapi2.register_instance(AMAPIv2(app.logger)) app.logger.info("[GAPIv2] Loaded.") return gapi2