annotate doc/examples/idavoll.tac @ 234:51af2ed8bd50

replaced idavoll imports by sat_pubsub imports
author Goffi <goffi@goffi.org>
date Thu, 17 May 2012 01:53:12 +0200
parents 5974e718f395
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
194
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
1 # Copyright (c) 2003-2008 Ralph Meijer
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
2 # See LICENSE for details.
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
3
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
4 """
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
5 Example TAC for Idavoll.
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
6 """
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
7
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
8 from twisted.application import service
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
9 from twisted.words.protocols.jabber.jid import JID
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
10
234
51af2ed8bd50 replaced idavoll imports by sat_pubsub imports
Goffi <goffi@goffi.org>
parents: 194
diff changeset
11 from sat_pubsub import tap
194
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
12
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
13 application = service.Application("Idavoll")
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
14
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
15 config = {
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
16 'jid': JID('pubsub.example.org'),
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
17 'secret': 'secret',
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
18 'rhost': '127.0.0.1',
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
19 'rport': 5347,
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
20 'backend': 'memory',
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
21 'verbose': True,
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
22 'hide-nodes': False,
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
23 }
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
24
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
25 idavollService = tap.makeService(config)
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
26 idavollService.setServiceParent(application)
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
27
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
28 # Set the maximum delay until trying to reconnect.
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
29 componentService = idavollService.getServiceNamed('component')
5974e718f395 Check in missing file, also part of Idavoll 0.7.3.
Ralph Meijer <ralphm@ik.nu>
parents:
diff changeset
30 componentService.factory.maxdelay = 300