3
from zope.interface import interface
4
Interface = interface.Interface
6
# TODO: move these here
7
from twisted.pb.tokens import ISlicer, IRootSlicer, IUnslicer
10
class DeadReferenceError(Exception):
11
"""The RemoteReference is dead, Jim."""
14
class IReferenceable(Interface):
15
"""This object is remotely referenceable. This means it is represented to
16
remote systems as an opaque identifier, and that round-trips preserve
20
def processUniqueID():
21
"""Return a unique identifier (scoped to the process containing the
22
Referenceable). Most objects can just use C{id(self)}, but objects
23
which should be indistinguishable to a remote system may want
24
multiple objects to map to the same PUID."""
26
class IRemotelyCallable(Interface):
27
"""This object is remotely callable. This means it defines some remote_*
28
methods and may have a schema which describes how those methods may be
32
def getInterfaceNames():
33
"""Return a list of RemoteInterface names to which this object knows
36
def doRemoteCall(methodname, kwargs):
37
"""Invoke the given remote method. This method may raise an
38
exception, return normally, or return a Deferred."""