view idavoll/backend.py @ 27:e6d62c93cd0a

Initial revision
author Ralph Meijer <ralphm@ik.nu>
date Sun, 17 Oct 2004 13:54:12 +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