Mercurial > libervia-pubsub
diff idavoll/tap_http.py @ 185:9038908dc2f5
Add gateway support for retrieving items from a node. Reorder gateway module.
author | Ralph Meijer <ralphm@ik.nu> |
---|---|
date | Tue, 15 Apr 2008 17:32:56 +0000 |
parents | c21b986cff30 |
children | b4bf0a5ce50d |
line wrap: on
line diff
--- a/idavoll/tap_http.py Fri Apr 11 14:48:32 2008 +0000 +++ b/idavoll/tap_http.py Tue Apr 15 17:32:56 2008 +0000 @@ -40,9 +40,11 @@ ss.setHandlerParent(cs) ss.startService() - # Set up web service that exposes the backend using REST + # Set up web service root = resource.Resource() + + # Set up resources that exposes the backend root.child_create = gateway.CreateResource(bs, config['jid'], config['jid']) root.child_delete = gateway.DeleteResource(bs, config['jid'], @@ -50,8 +52,11 @@ root.child_publish = gateway.PublishResource(bs, config['jid'], config['jid']) root.child_list = gateway.ListResource(bs) - root.child_subscribe = gateway.SubscribeResource(ss) - root.child_unsubscribe = gateway.UnsubscribeResource(ss) + + # Set up resources for accessing remote pubsub nodes. + root.child_subscribe = gateway.RemoteSubscribeResource(ss) + root.child_unsubscribe = gateway.RemoteUnsubscribeResource(ss) + root.child_items = gateway.RemoteItemsResource(ss) site = server.Site(root) w = internet.TCPServer(int(config['webport']), channel.HTTPFactory(site))