Package flumotion :: Package twisted :: Module pb :: Class Avatar
[show private | hide private]
[frames | no frames]

Class Avatar

  Avatar --+
           |
Loggable --+
           |
          Avatar

Known Subclasses:
FeedAvatar, PingableAvatar


Method Summary
  __init__(self, avatarId)
  disconnect(self)
Disconnect the remote PB client.
  mindCallRemote(self, name, *args, **kwargs)
Call the given remote method, and log calling and returning nicely.
  mindCallRemoteLogging(self, level, stackDepth, name, *args, **kwargs)
Call the given remote method, and log calling and returning nicely.
  perspectiveMessageReceived(self, broker, message, args, kwargs)
  setMind(self, mind)
Tell the avatar that the given mind has been attached.
    Inherited from Loggable
  debug(self, *args)
Log a debug message.
dict doLog(self, level, where, format, *args, **kwargs)
Log a message at the given level, with the possibility of going higher up in the stack.
  error(self, *args)
Log an error.
  info(self, *args)
Log an informational message.
  log(self, *args)
Log a log message.
  logFunction(self, *args)
Overridable log function.
  logObjectName(self)
Overridable object name function.
  warning(self, *args)
Log a warning.
  warningFailure(self, failure, swallow)
Log a warning about a Failure.

Class Variable Summary
str logCategory: Implementors can provide a category to log their messages under.
str remoteLogName: name to use to log the other side of the connection
    Inherited from Avatar
Implements __implemented__ = <implementedBy twisted.spread.pb.Avata...
ClassProvides __providedBy__ = <zope.interface.declarations.ClassProvi...
ClassProvides __provides__ = <zope.interface.declarations.ClassProvide...

Method Details

disconnect(self)

Disconnect the remote PB client. If we are already disconnected, do nothing.

mindCallRemote(self, name, *args, **kwargs)

Call the given remote method, and log calling and returning nicely.
Parameters:
name - name of the remote method
           (type=str)

mindCallRemoteLogging(self, level, stackDepth, name, *args, **kwargs)

Call the given remote method, and log calling and returning nicely.
Parameters:
level - the level we should log at (log.DEBUG, log.INFO, etc)
           (type=int)
stackDepth - the number of stack frames to go back to get file and line information, negative or zero.
           (type=non-positive int)
name - name of the remote method
           (type=str)

setMind(self, mind)

Tell the avatar that the given mind has been attached. This gives the avatar a way to call remotely to the client that requested this avatar. This is scheduled by the portal after the client has logged in.
Parameters:
mind
           (type=twisted.spread.pb.RemoteReference)

Class Variable Details

logCategory

Implementors can provide a category to log their messages under.
Type:
str
Value:
'avatar'                                                               

remoteLogName

name to use to log the other side of the connection
Type:
str
Value:
'remote'                                                               

Generated by Epydoc 2.1 on Fri May 18 09:35:47 2007 http://epydoc.sf.net