[Zope-Checkins] CVS: Zope3 - z3.py:1.1.2.19.2.1

Jim Fulton jim@zope.com
Sat, 16 Mar 2002 09:46:13 -0500


Update of /cvs-repository/Zope3
In directory cvs.zope.org:/tmp/cvs-serv25339

Modified Files:
      Tag: Zope3-publisher-refactor-branch
	z3.py 
Log Message:
Checking in partial publisher refactoring on the
Zope3-publisher-refactor-branch branch to facilitate collaboration
with Stephan.



=== Zope3/z3.py 1.1.2.19 => 1.1.2.19.2.1 ===
           here] + filter(None, sys.path)
 
+from Zope.App.ZopePublication.Browser.Publication import PublicationFactory
+from Zope.Publisher.Browser.Request import RequestFactory
+
 from Zope.Publisher.Browser.IBrowserPublisher import IBrowserPublisher
 from Zope.App.ZopePublication.ZopePublication import BrowserPublication
-from Zope.App.Security.SimpleSecurityPolicies import \
-     PermissiveSecurityPolicy
+from Zope.App.Security.SimpleSecurityPolicies \
+     import PermissiveSecurityPolicy
 from Zope.App.Security.SecurityManager import setSecurityPolicy
-from Zope.Publisher.HTTP.BrowserPayload import BrowserRequestPayload, \
-     BrowserResponsePayload
+#from Zope.Publisher.HTTP.BrowserPayload import BrowserRequestPayload, \
+#     BrowserResponsePayload
 from Zope.App.OFS.Folder.RootFolder import RootFolder
 import asyncore, zLOG
 from Zope.Server import ZLogIntegration
@@ -60,16 +63,36 @@
 connection.close()
 
 
-publication = BrowserPublication(DB)
-request_payload = BrowserRequestPayload(publication)
-response_payload = BrowserResponsePayload()
+#publication = BrowserPublication(DB)
+#request_payload = BrowserRequestPayload(publication)
+#response_payload = BrowserResponsePayload()
 
 td = ThreadedTaskDispatcher()
 td.setThreadCount(4)
 
 hit_log = CommonHitLogger()
-PublisherHTTPServer(request_payload, response_payload,
+#PublisherHTTPServer(request_payload, response_payload,
+#                    '', 8880, task_dispatcher=td, verbose=1, hit_log=hit_log)
+
+PublisherHTTPServer('Browser', PublicationFactory(DB), RequestFactory(),
                     '', 8080, task_dispatcher=td, verbose=1, hit_log=hit_log)
+
+#from Zope.Publisher.HTTP.FactoryChooser import FactoryChooser
+#
+#chooser = FactoryChooser()
+#chooser.addRule(
+#    xmlrpcrule, 'XMLRPC', XMLRPCPublicationFactory(DB), XMLRPCRequestFactory()
+#    )
+#chooser.addRule(
+#    soaprule, 'SOAP', SOAPPublicationFactory(DB), SOAPRequestFactory()
+#    )
+#chooser.setDefault('Browser', PublicationFactory(DB), RequestFactory())
+#
+#MultiHTTPServer(chooser,
+#                '', 8081, task_dispatcher=td, verbose=1, hit_log=hit_log)
+
+
+
 
 try:
     asyncore.loop()