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
def getroute(self, message): desturl = message.getheader("DEST", self.local_hostname) destination = ParsedURL.fromstring(desturl) return self.destinations.get(destination.hostname, self.dead_letters)
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__()
def fromurl(klass, url): return klass(ParsedURL.fromstring(url))