Package twisted :: Package sibling :: Module parentserv :: Class MotherService
[frames | no frames]

Class MotherService

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


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

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

Class Variable Summary
    Inherited from Service
NoneType serviceName = None                                                                  
NoneType serviceType = None                                                                  
    Inherited from ApplicationService
int persistenceVersion = 1                                                                     
NoneType serviceParent = None                                                                  
int serviceRunning = 0                                                                     
    Inherited from Versioned
tuple persistenceForgets = ()
    Inherited from Perspective
tuple __implements__ = (<class twisted.cred.perspective.IPersp...
int _attachedCount = 0                                                                     
int _service_cached = 0                                                                     

Method Details

loadRemoteResource(self, resourceType, resourceName, generateTicket, *args)

Request a sibling-server to load a resource.

NOTE: caching of ticket resources could be an issue... do we cache tickets??

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

loadRemoteResourceFor(self, siblingPerspective, resourceType, resourceName, generateTicket, *args)

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

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 sibling to set the host and port to publish for clients.

perspective_unloadResource(self, resourceType, resourceName)

This is called by sibling services to unload a resource

Generated by Epydoc 2.0 on Sat Sep 13 04:20:55 2003 http://epydoc.sf.net