Package twisted :: Package sister :: Module motherserv :: Class MotherService
[show private | hide private]
[frames | no frames]

Class MotherService

OriginalAccessor --+            
                   |            
       Versioned --+            
                   |            
  ApplicationService --+        
                       |        
                 Service --+    
                           |    
                     Service --+
                               |
             Perspective --+   |
                           |   |
                 Perspective --+
                               |
                              MotherService


A `mother' object, managing many sister-servers.

I maintain a list of all "sister" servers who are connected, so that all servers can connect to each other. I also negotiate which distributed objects are owned by which sister servers, so that if any sister-server needs to locate an object it can be made available.
Method Summary
  __init__(self, sharedSecret, serviceName, application)
  __delattr__(self, k)
(inherited from OriginalAccessor)
  __getattr__(self, k)
(inherited from OriginalAccessor)
  __getstate__(self, dict)
Get state, adding a version number to it on its way out. (inherited from Versioned)
  __setattr__(self, k, v)
(inherited from OriginalAccessor)
  __setstate__(self, state)
(inherited from Versioned)
  addPerspective(self, perspective)
Add a perspective to this Service. (inherited from Service)
  attached(self, reference, identity)
Called when a remote reference is 'attached' to me. (inherited from Perspective)
  brokerAttached(self, reference, identity, broker)
An intermediary method to override. (inherited from Perspective)
  brokerDetached(self, reference, identity, broker)
See brokerAttached. (inherited from Perspective)
  cachePerspective(self, perspective)
Cache a perspective loaded from an external data source. (inherited from Service)
  createPerspective(self, name)
Create a perspective from self.perspectiveClass and add it to this service. (inherited from Service)
  detached(self, client, identity)
  disownServiceParent(self)
Have my parent disown me. (inherited from ApplicationService)
  get_application(self)
(inherited from ApplicationService)
  getIdentityRequest(self)
Request my identity. (inherited from Perspective)
  getPerspectiveForIdentity(self, name, identity)
A hook to use if the identity is required when getting the perspective. (inherited from Service)
  getPerspectiveName(self)
Return the unique name of this perspective. (inherited from Perspective)
  getPerspectiveNamed(self, name)
Return a perspective that represents a user for this service. (inherited from Service)
  getPerspectiveRequest(self, name)
Return a Deferred which is a request for a perspective on this service. (inherited from Service)
  getService(self)
Return a service. (inherited from Perspective)
  getServiceName(self)
The name of this service. (inherited from Service)
  getServiceType(self)
Get a string describing the type of this service. (inherited from Service)
  loadPerspective(self, name)
Load a perspective from an external data-source. (inherited from Service)
  loadRemoteResource(self, resourceType, resourceName, *args)
Request a sister-server to load a resource.
  loadRemoteResourceFor(self, sisterPerspective, resourceType, resourceName, *args)
Use to load a remote resource on a specified sister service.
  makeIdentity(self, password)
Make an identity from this perspective with a password. (inherited from Perspective)
  perspective_callDistributed(self, srcResourceType, srcResourceName, destResourceType, destResourceName, methodName, *args, **kw)
Call a remote method on a resources that is managed by the system.
  perspective_publishIP(self, host, port, clientRef)
called by sister to set the host and port to publish for clients.
  perspective_unloadResource(self, resourceType, resourceName)
This is called by sister services to unload a resource
  perspectiveMessageReceived(self, broker, message, args, kw)
This method is called when a network message is received. (inherited from Perspective)
  reallyDel(self, k)
*actually* del self.k without incurring side-effects. (inherited from OriginalAccessor)
  reallySet(self, k, v)
*actually* set self.k to v without incurring side-effects. (inherited from OriginalAccessor)
  set_application(self, application)
(inherited from ApplicationService)
  setApplication(self, application)
(inherited from ApplicationService)
  setIdentity(self, ident)
Determine which identity I connect to. (inherited from Perspective)
  setIdentityName(self, name)
(inherited from Perspective)
  setService(self, service)
Change what service I am a part of. (inherited from Perspective)
  setServiceParent(self, serviceParent)
Set my parent, which must be a service collection of some kind. (inherited from ApplicationService)
  startService(self)
This call is made as a service starts up. (inherited from ApplicationService)
  stopService(self)
This call is made before shutdown. (inherited from ApplicationService)
  uncachePerspective(self, perspective)
Uncache a perspective loaded from an external data source. (inherited from Service)
  upgradeToVersion1(self)
(inherited from ApplicationService)
  versionUpgrade(self)
(internal) Do a version upgrade. (inherited from Versioned)
  _cbLoadedResource(self, result, resourceType, resourceName, host, port, sisterPerspective)

Method Details

loadRemoteResource(self, resourceType, resourceName, *args)

Request a sister-server to load a resource.

Return a Deferred which will fire with (data, host, port, sister), that will describe where and how a resource can be located.

loadRemoteResourceFor(self, sisterPerspective, resourceType, resourceName, *args)

Use to load a remote resource on a specified sister service. Dont load it if already loaded on a sister.

perspective_callDistributed(self, srcResourceType, srcResourceName, destResourceType, destResourceName, methodName, *args, **kw)

Call a remote method on a resources that is managed by the system.

perspective_publishIP(self, host, port, clientRef)

called by sister to set the host and port to publish for clients.

perspective_unloadResource(self, resourceType, resourceName)

This is called by sister services to unload a resource

Generated by Epydoc 1.2 prerelease on Wed Jan 29 06:28:47 2003 http://epydoc.sf.net