Esempio n. 1
0
    def __init__(self, headers, context, payload):
        headers = copy.copy(headers)
        headers["reply_to"] = str(entry_point.NullEntryPoint())
        headers["destination"] = str(entry_point.NullEntryPoint())
        headers["message_type"] = "notification"
        headers["request_id"] = uuid.uuid4().hex

        if not headers["correlation_id"]:
            headers["correlation_id"] = str(uuid.uuid4())

        super(Notification, self).__init__(headers, context, payload)
Esempio n. 2
0
 def setUp(self):
     super(NullEntryPointTestCase, self).setUp()
     self.null_ep = entry_point.NullEntryPoint()
Esempio n. 3
0
 def cast(self, correlation_id="", context="", source=""):
     request = self._make_request(context=context,
                                  correlation_id=correlation_id,
                                  reply_to=entry_point.NullEntryPoint(),
                                  source=source)
     self._postprocessor.process(request)
Esempio n. 4
0
 def __init__(self, headers, context, payload):
     headers = copy.copy(headers)
     headers["reply_to"] = str(entry_point.NullEntryPoint())
     headers["destination"] = str(entry_point.NullEntryPoint())
     headers["message_type"] = "notification"
     super(IncomingNotification, self).__init__(headers, context, payload)
Esempio n. 5
0
 def __init__(self, headers, context, payload):
     headers = copy.copy(headers)
     headers["reply_to"] = str(entry_point.NullEntryPoint())
     headers["message_type"] = "error"
     super(BaseError, self).__init__(headers, context, payload)