view idavoll/backend.py @ 28:39d0c6fa027f

Initial revision
author Ralph Meijer <ralphm@ik.nu>
date Mon, 18 Oct 2004 15:29:25 +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