Module mcuser :: Class MCUser
[hide private]
[frames] | no frames]

Class MCUser

source code

Instance Methods [hide private]
 
__init__(self, userAttributes, clientServices=None, virtual=False)
Generates a user object.
source code
 
toDict(self)
Convert to a dict holding only standard python types.
source code
 
clientServices(self)
Returns the client service object assigned.
source code
 
setIP(self, address)
Sets the currently connected client's IP address.
source code
 
setClient(self, client)
Sets the remote client reference.
source code
 
client(self)
Returns the remote client reference.
source code
 
setLoseConnection(self, method)
Sets the method to be used for disconnecting client represented by this object.
source code
 
setFullName(self, fullName)
Sets the connected user's full name.
source code
 
setStartTime(self, time=None)
Sets the starting time for this user connection.
source code
 
setServer(self, server)
Sets a reference to the application server.
source code
 
setAvatarList(self, avatarList)
Assigns the currently connected avatar list to this avatar.
source code
 
uniqID(self)
Returns unique ID of this user instance.
source code
 
userName(self)
Return the username of the user object.
source code
 
setUsername(self, userName)
Sets the username of the user object to a new name.
source code
 
domainName(self)
Return the domain name of the user object.
source code
 
setDomainName(self, domain)
Sets the domain name of the user object.
source code
 
IP(self)
Returns the client IP address of this user.
source code
 
virtual(self)
Returns if user is virtual or not.
source code
 
setVirtual(self, virtual)
Sets the virtual property of the user object.
source code
 
authList(self)
Returns the list of this user's authentication code list.
source code
 
setAuthList(self, authList)
Sets the authentication code list of this user.
source code
 
pingClient(self)
Periodically calls a remote ping method on the client.
source code
 
perspectiveMessageReceived(self, broker, message, args, kw)
This method was copied from spread/pb.py.
source code
 
connect(self, startPinger=True)
Method called upon connection of the client represented by this class.
source code
 
disconnect(self)
Method called upon disconnection of the client represented by this class.
source code
 
forceDisconnect(self)
Forcibly disconnects the client represented by this object.
source code
 
perspective_clientServices(self)
Returns the remotely callable services to the client.
source code
 
perspective_getServerCert(self)
Remote method that is to be called by the clients to obtain the server's certificate that includes the public key.
source code
 
perspective_ping(self)
Answers client's periodic ping requests.
source code
 
__providedBy__(...)
Object Specification Descriptor
source code
Static Methods [hide private]
 
fromDict(aDict)
Returns an MCUser instance by using the dictionary passed.
source code
Class Variables [hide private]
  __implemented__ = <implementedBy mcuser.MCUser>
  __provides__ = <zope.interface.declarations.ClassProvides obje...
Method Details [hide private]

fromDict(aDict)
Static Method

source code 

Returns an MCUser instance by using the dictionary passed.

Parameters:
  • aDict (dict) - A dictionary, previously obtained by toDict()
Returns:
A new MCUser instance

setIP(self, address)

source code 

Sets the currently connected client's IP address.

Parameters:
  • address - IP address

setClient(self, client)

source code 

Sets the remote client reference.

Parameters:
  • client - Avatar's mind object (reference to remote client presence)

setLoseConnection(self, method)

source code 

Sets the method to be used for disconnecting client represented by this object.

Parameters:
  • method - Reference to client's loseConnection method.

setFullName(self, fullName)

source code 

Sets the connected user's full name.

Parameters:
  • fullName (str) - Full name of user

setStartTime(self, time=None)

source code 

Sets the starting time for this user connection.

Parameters:
  • time (mx.DateTime) - If given, this time is used as the start time of connection. If None, current time is used.

setServer(self, server)

source code 

Sets a reference to the application server.

Parameters:
  • server (Server) - Reference to application server.

setAvatarList(self, avatarList)

source code 

Assigns the currently connected avatar list to this avatar.

Parameters:
  • avatarList (list) - A list of currently connected avatars.

setUsername(self, userName)

source code 

Sets the username of the user object to a new name.

Parameters:
  • userName (str) - User name

pingClient(self)

source code 

Periodically calls a remote ping method on the client. If the request sent in the previous call is unanswered, then increments the missing ping count. If missing ping count is exceeded, force the disconnect of the remote user.

connect(self, startPinger=True)

source code 

Method called upon connection of the client represented by this class.

Parameters:
  • startPinger - If True, ping tester task is run, which is the default.

forceDisconnect(self)

source code 

Forcibly disconnects the client represented by this object. May be called directly by the developer.

perspective_getServerCert(self)

source code 

Remote method that is to be called by the clients to obtain the server's certificate that includes the public key. Certificate is returned in PEM format.

Returns:
Server's certificate in PEM format

Class Variable Details [hide private]

__provides__

Value:
<zope.interface.declarations.ClassProvides object at 0x90488cc>