Package SPyRO :: Module SPyRO :: Class Response
[hide private]
[frames] | no frames]

Class Response

source code

Objects to send as response at requests. The request codes are the following: Successful = 0 # Unknown Object, no object registered to share in server, retvalue is None ErrorUnknownObject = 1 # Object doesn't have specified attribute, retvalue = None ErrorUnknownAttribute = 2 # NO USAR # An Exception Throw, exception is returned in retvalue ErrorExceptionThrowed = 3 # An error on protocol ErrorUnknownRequestType = 4 # The object is callable, we don't wanna send it, we want to call it ObjectIsCallable = 5 # The object or the method is not accesible with the authentication or is not valid ErrorInTheAuthentication = 6

Instance Methods [hide private]
 
__init__(self, errcode=None, retvalue=None, rettype=None)
Initialize the response with an error code |errcode| and the return value |retvalue|
source code
 
errname(self)
Returns the name of the errcode
source code
 
prepareToCall(self, remoteobj)
Returns the returned value of calling |methodname| with arguments |args|.
source code
 
__call__(self, *args, **kwargs)
Internal function, this is the real __call__ method
source code
Class Variables [hide private]
  Successful = 0
  ErrorUnknownObject = 1
  ErrorUnknownAttribute = 2
  ErrorExceptionThrowed = 3
  ErrorUnknownRequestType = 4
  ObjectIsCallable = 5
  ErrorInTheAuthentication = 6
  ErrorNames = ['Successful', 'ErrorUnknownObject', 'ErrorUnknow...
Method Details [hide private]

prepareToCall(self, remoteobj)

source code 
Returns the returned value of calling |methodname| with arguments |args|. Can raise remote exceptions or locals due to remote errors

Class Variable Details [hide private]

ErrorNames

Value:
['Successful',
 'ErrorUnknownObject',
 'ErrorUnknownAttribute',
 'ErrorExceptionThrowed',
 'ErrorUnknownRequestType',
 'ObjectIsCallable',
 'ErrorInTheAuthentication']