Module mcremote :: Class MCRemote
[hide private]
[frames] | no frames]

Class MCRemote

source code


Base class for remotely callable objects, classes derived from this are created by the worker class.

Instance Methods [hide private]
 
__init__(self, worker, clientRequest, session)
Initilizes the Mobile Code Sender Object
source code
 
domain(self)
Returns the domain object of the current request's user.
source code
 
log(self, msg)
Logs the given message to the application server.
source code
 
sendMsg(*args, **kwargs)
Sends a message to clients connected to this domain.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]
 
checkAuth(authCode)
Class method used as a decorator function to check user authorization.
source code
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, worker, clientRequest, session)
(Constructor)

source code 

Initilizes the Mobile Code Sender Object

Parameters:
  • worker (Worker) - Worker object creating this object
  • clientRequest (ClientRequest) - Client request of this call
  • session (Sqlalchemy session) - Current database session
Overrides: object.__init__

log(self, msg)

source code 

Logs the given message to the application server.

Parameters:
  • msg (str) - Message to be logged
Returns:
A deferred that will fire when log message is delivered to server.

sendMsg(*args, **kwargs)

source code 

Sends a message to clients connected to this domain.
NOTE: This method should *always* be yielded. Otherwise memory
      mapped file related problems may occur.

@param taskPath: Message identifier, should be similar to 'a.b.c'
@type  taskPath: C{string}
@param args: Message parameters
@param kw: Message keyword parameters

Decorators:
  • @defer.inlineCallbacks