Package twisted :: Package manhole :: Module service :: Class Perspective
[frames | no frames]

Class Perspective

Perspective --+    
              |    
    Perspective --+
                  |
                 Perspective


Method Summary
  __init__(self, perspectiveName, identityName)
Create me.
  __getstate__(self)
  _cbClientCapable(self, capabilities, client)
  _cbResult(self, val, dnum)
  _ebClientCapable(self, reason, client)
  attached(self, client, identity)
A client has attached -- welcome them and add them to the list.
  console(self, message)
Pass a message to my clients' console.
  detached(self, client, identity)
  perspective_do(self, expr)
Evaluate the given expression, with output to the console.
  perspective_explore(self, identifier)
Browse the object obtained by evaluating the identifier.
  perspective_watch(self, identifier)
Watch the object obtained by evaluating the identifier.
  receiveExplorer(self, objectLink)
Pass an Explorer on to my clients.
  runInConsole(self, command, *args, **kw)
Convience method to "runInConsole with my stuff".
  setService(self, service)
Change what service I am a part of.
    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
  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)

Class Variable Summary
int lastDeferred = 0                                                                     
    Inherited from Perspective
tuple __implements__ = (<class twisted.cred.perspective.IPersp...
int _attachedCount = 0                                                                     
int _service_cached = 0                                                                     

Method Details

__init__(self, perspectiveName, identityName='Nobody')
(Constructor)

Create me.

I require a name for myself and a reference to the service I participate in. (My identity name will be 'Nobody' by default, which will normally not resolve.)
Overrides:
twisted.cred.perspective.Perspective.__init__ (inherited documentation)

attached(self, client, identity)

A client has attached -- welcome them and add them to the list.
Overrides:
twisted.cred.perspective.Perspective.attached

console(self, message)

Pass a message to my clients' console.

perspective_do(self, expr)

Evaluate the given expression, with output to the console.

The result is stored in the local variable '_', and its repr() string is sent to the console as a "result" message.

perspective_explore(self, identifier)

Browse the object obtained by evaluating the identifier.

The resulting ObjectLink is passed back through the client's receiveBrowserObject method.

perspective_watch(self, identifier)

Watch the object obtained by evaluating the identifier.

Whenever I think this object might have changed, I will pass an ObjectLink of it back to the client's receiveBrowserObject method.

receiveExplorer(self, objectLink)

Pass an Explorer on to my clients.

runInConsole(self, command, *args, **kw)

Convience method to "runInConsole with my stuff".

setService(self, service)

Change what service I am a part of.
Overrides:
twisted.cred.perspective.Perspective.setService (inherited documentation)

Class Variable Details

lastDeferred

Type:
int
Value:
0                                                                     

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