5 class DMaaPServer(BaseHTTPServer.HTTPServer):
7 def __init__(self, server_address, protocol, dmaap_simulator):
9 def handler_class_constructor(*args):
10 DMaaPHandler.DMaaPHandler(dmaap_simulator, *args)
11 DMaaPHandler.protocol_version = protocol
12 BaseHTTPServer.HTTPServer.__init__(self, server_address, handler_class_constructor)
14 serer_address = self.socket.getsockname()
15 print "Serving HTTP on", serer_address[0], "port", serer_address[1], "..."
18 def create_dmaap_server(dmaap_simulator, protocol="HTTP/1.0", port=3904):
19 server_address = ('', port)
20 httpd = DMaaPServer(server_address, protocol, dmaap_simulator)