Ahenk/opt/ahenk/base/model/MessageFactory.py

17 lines
531 B
Python
Raw Normal View History

2016-03-14 10:55:28 +02:00
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: İsmail BAŞARAN <ismail.basaran@tubitak.gov.tr> <basaran.ismaill@gmail.com>
from base.model.MessageType import MessageType
class MessageFactory(object):
def createMessage(self,type,message):
if type == MessageType.TASK_RECEIVED:
return "Message receivden response"
elif type == MessageType.TASK_PROCESSING:
return "Message processing response"
2016-03-14 17:42:17 +02:00
else:
2016-03-14 10:55:28 +02:00
return None
createMessage = staticmethod(createMessage)