2016-03-01 17:26:10 +02:00
|
|
|
#!/usr/bin/python3
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
|
|
|
|
from base.Scope import Scope
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
|
2016-03-01 17:26:10 +02:00
|
|
|
class AbstractCommand(object):
|
|
|
|
"""docstring for AbstractCommand"""
|
2016-03-23 17:15:27 +02:00
|
|
|
|
2016-03-01 17:26:10 +02:00
|
|
|
def __init__(self):
|
|
|
|
super(AbstractCommand, self).__init__()
|
|
|
|
self.scope = Scope.getInstance()
|
|
|
|
|
2016-03-01 18:43:26 +02:00
|
|
|
def handle_task(task):
|
2016-03-01 17:26:10 +02:00
|
|
|
# implement this metot from command
|
|
|
|
pass
|
|
|
|
|
|
|
|
def logger(self):
|
|
|
|
try:
|
|
|
|
return self.scope.getLogger()
|
|
|
|
except Exception as e:
|
|
|
|
print('Logger did not found')
|
|
|
|
return None
|
|
|
|
|
2016-03-01 18:43:26 +02:00
|
|
|
def configurationManager(self):
|
|
|
|
try:
|
|
|
|
return self.scope.getConfigurationManager()
|
|
|
|
except Exception as e:
|
|
|
|
print('ConfigurationManager did not found')
|
|
|
|
return None
|
|
|
|
|
2016-03-01 17:26:10 +02:00
|
|
|
def addMessageResponseQueue(self):
|
|
|
|
# TODO implement response queue
|
|
|
|
pass
|