示例#1
0
 def getroute(self, message):
     desturl = message.getheader("DEST", self.local_hostname)
     destination = ParsedURL.fromstring(desturl)
     if destination.hostname in self.local_hostnames:
         route = self.local_messages
     else:
         route = self.remote_messages
     return route
示例#2
0
 def getroute(self, message):
     desturl = message.getheader("DEST", self.local_hostname)
     destination = ParsedURL.fromstring(desturl)
     return self.destinations.get(destination.hostname, self.dead_letters)
示例#3
0
 def __init__(self, nodeurl):
     self.nodeurl = nodeurl
     self.nodeaddr = ParsedURL.fromstring(nodeurl)
     self.request_service = as_node("/services/messaging/Request Service")
     super(NodeMessenger, self).__init__()
示例#4
0
 def fromurl(klass, url):
     return klass(ParsedURL.fromstring(url))
示例#5
0
 def __init__(self, nodeurl):
     self.nodeurl = nodeurl
     self.nodeaddr = ParsedURL.fromstring(nodeurl)
     self.request_service = as_node("/services/messaging/Request Service")
     super(NodeMessenger, self).__init__()