Package twisted :: Package sister :: Module sisterserv :: Class SisterService
[show private | hide private]
[frames | no frames]

Class SisterService

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


A 'sister' object, managed by a mother server

I am one of a set of sisters managed by a mother server. I use the mother server as a central manager of distributed objects, and as a mechanism for communicating to other sister servers.

Distributed login into me is handled by passing identity resources - which I have a special loader and authorizer for.
Method Summary
  __init__(self, motherHost, motherPort, motherService, publishHost, localPort, serviceName, sharedSecret, application)
Initialize me.
  __delattr__(self, k)
(inherited from OriginalAccessor)
  __getattr__(self, k)
(inherited from OriginalAccessor)
  __getstate__(self)
  __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)
  callDistributed(self, caller, destResourceType, destResourceName, methodName, *args, **kw)
Call a distributed method on a resource managed by the sister network.
  createPerspective(self, name)
Create a perspective from self.perspectiveClass and add it to this service. (inherited from Service)
  detached(self, reference, identity)
Called when a broker is 'detached' from me. (inherited from Perspective)
  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)
  loadResource(self, resourceType, resourceName, args)
Returns a Deferred when the resource is loaded.
  makeIdentity(self, password)
Make an identity from this perspective with a password. (inherited from Perspective)
  ownResource(self, resourceObject, resourceType, resourceName)
  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)
  registerResourceLoader(self, resourceType, resourceLoader)
Register a callable object to generate resources.
  removeIdentity(self, identityName)
  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.
  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)
  unloadResource(self, resourceType, resourceName)
  upgradeToVersion1(self)
(inherited from ApplicationService)
  versionUpgrade(self)
(internal) Do a version upgrade. (inherited from Versioned)
  _cbLocked(self, result, path)
  _cbUnload(self, data)
  _ebLocked(self, error, path)

Method Details

__init__(self, motherHost, motherPort, motherService, publishHost, localPort, serviceName='twisted.sister', sharedSecret='shhh!', application=None)
(Constructor)

Initialize me.

(Application's authorizer must be a TicketAuthorizer, otherwise login won't work.)

callDistributed(self, caller, destResourceType, destResourceName, methodName, *args, **kw)

Call a distributed method on a resource managed by the
sister network. This will call the method 'getResourceInfo' on
the calling object which must return its resourceType and
resourceName to be identified by.  The final method being called will have
'sister_' prepended to its name and have the calling objects resourceType and
resourceName as the first arguments.

#NOTE: this method of identifying the calling object is temporary.. need to
       establish a better way which includes allowing the calling object to
       expose some data and/or functionality to the caller.

loadResource(self, resourceType, resourceName, args)

Returns a Deferred when the resource is loaded. This deferred may yield some data that is returned to the caller.

registerResourceLoader(self, resourceType, resourceLoader)

Register a callable object to generate resources.

The callable object may return Deferreds or synchronous values.

startService(self)

This call is made as a service starts up.
Overrides:
twisted.internet.app.ApplicationService.startService (inherited documentation)

Generated by Epydoc 1.1 on Sat Feb 15 21:19:23 2003 http://epydoc.sf.net