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>
|
2016-04-20 18:05:05 +03:00
|
|
|
from base.model.enum.MessageType import MessageType
|
2016-03-14 10:55:28 +02:00
|
|
|
|
|
|
|
|
2016-03-23 17:15:27 +02:00
|
|
|
class MessageFactory(object):
|
|
|
|
def createMessage(self, type, message):
|
2016-03-14 10:55:28 +02:00
|
|
|
|
|
|
|
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
|
2016-03-23 17:15:27 +02:00
|
|
|
|
2016-03-14 10:55:28 +02:00
|
|
|
createMessage = staticmethod(createMessage)
|