view idavoll/backend.py @ 25:256dcda26752

Bugfix: use 'event' element instead of 'x' for notifications. Changed adapter registration to reflect name change of backend.IService.
author Ralph Meijer <ralphm@ik.nu>
date Sun, 17 Oct 2004 13:53:01 +0000
parents 4f3bbefc6fad
children d4fc29bb5381
line wrap: on
line source

from twisted.python import components

class IService(components.Interface):
	""" Interface to a backend service of a pubsub service """

	def do_publish(self, node, publisher, item):
		""" Returns a deferred that returns """

class Error(Exception):
	msg = ''

	def __str__(self):
		return self.msg
	
class NodeNotFound(Error):
	msg = 'Node not found'

class NotAuthorized(Error):
	pass

class PayloadExpected(Error):
	msg = 'Payload expected'

class NoPayloadAllowed(Error):
	msg = 'No payload allowed'

class NoInstantNodes(Error):
	pass

class NodeExists(Error):
	pass