| Trees | Index | Help |
|
|---|
| Module AjaxStub :: Class AjaxStub |
|
object --+
|
AjaxStubDispatch --+
|
AjaxStub
| Method Summary | |
|---|---|
Call the constructor of the base class passing it the encoding type. | |
Return the default CGI method. | |
Get the raw CGI value of the provided key. | |
Get a tuple of the function and method dictionaries. | |
Get a list of the registered functions and/or methods to be turned into JavaScript stubs. | |
Test if the CGI name exists. | |
Enables the including of the traceback in the error result. | |
Register the functions. | |
Set the CGI method to either 'GET' or 'POST'. | |
Remove the object mapped to by the method name from the StubContainer. | |
Find if the class method has a CGI method defined. | |
A generator returning a stub string. | |
Get the JavaScript stub by name. | |
Iterate through the provided map adding the stubs to a srting variable. | |
Check if method is a valid CGI method. | |
Create an HTML compliant traceback. | |
Iterate through args for each stub, test for an instance of a Tuple. | |
Register the class object methods. | |
Return the two JavaScript variables that need to be set prior to instantiating the JavaScript AjaxStub class. | |
Create the stubs and return them as a string. | |
Handle the request from the client and execute the method/function requested from the client. | |
| Inherited from AjaxStubDispatch | |
Add new content types to the defaults. (Class method) | |
Dispatch the JavaScript request code, of your choice, plus the stubs to standard out. | |
Send the content type to the client. | |
Print to standard out the results of the requested function or method call. | |
Encode HTML for sending to the client. | |
Encode JSON to send to the client. | |
Encode XML to send to the client. | |
Returns the content type. | |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
x.__hash__() <==> hash(x) | |
T.__new__(S, ...) -> a new object with type S, a subtype of T | |
helper for pickle | |
helper for pickle | |
x.__repr__() <==> repr(x) | |
x.__setattr__('name', value) <==> x.name = value | |
x.__str__() <==> str(x) | |
| Class Variable Summary | |
|---|---|
str |
ARGUMENT = 'arg'
|
str |
COMMAND = 'cmd'
|
str |
GET = 'GET'
|
str |
POST = 'POST'
|
str |
_AjaxStub__CALLBACK = 'CB'
|
list |
_AjaxStub__cgiMethods = ['GET', 'POST']
|
SRE_Pattern |
_AjaxStub__REGEX = [ \n\r\t]+
|
str |
_FAILURE = 'failure'
|
str |
_RESULT = 'result'
|
str |
_STATUS = 'status'
|
str |
_SUCCESS = 'success'
|
| Inherited from AjaxStubDispatch | |
str |
HTML = 'HTML'
|
str |
JSON = 'JSON'
|
str |
XML = 'XML'
|
dict |
_AjaxStubDispatch__CONTENT_TYPE = {'XML': 'text/xml', 'J...
|
| Instance Method Details |
|---|
__init__(self,
type='HTML',
methodClassInstance=None)
|
getCGIMethod(self)Return the default CGI method.
|
getCGIValue(self, key)Get the raw CGI value of the provided key.
|
getMethodMaps(self)Get a tuple of the function and method dictionaries.
|
getStubMethodNameList(self)Get a list of the registered functions and/or methods to be turned into JavaScript stubs.
|
hasCGIKey(self, key)Test if the CGI name exists.
|
includeTraceback(self)Enables the including of the traceback in the error result. |
register(self, *args)Register the functions.
|
setCGIMethod(self, method='GET')Set the CGI method to either 'GET' or 'POST'.
|
unregister(self, name)Remove the object mapped to by the method name from the
|
__findCGIMethod(self, methodObj)Find if the class method has a CGI method defined. Warning: This way of getting the CGI method may be unreliable since it depends on the implementer to never use any of the CGI types for anything other than defining the CGI method.
|
__getNextStub(self, mmap)A generator returning a stub string.
|
__getStub(self, stub)Get the JavaScript stub by name.
|
__getStubs(self, mmap)Iterate through the provided map adding the stubs to a srting variable.
|
__isValidCGIMethod(self, method)Check ifmethod is a valid CGI method.
|
__makeTraceback(self)Create an HTML compliant traceback.
|
__register(self, mmap, args)Iterate through args for each stub, test for an instance of a Tuple. If a Tuple check if the 2nd value is a valid CGI method if not raise an exception else put this stub and the CGI method in the provided map. If not a Tuple put just the stub in the provided map.
|
__registerMethods(self)Register the class object methods. |
_exportAjaxStubArgsJS(self)Return the two JavaScript variables that need to be set prior to instantiating the JavaScript AjaxStub class.
|
_exportStubsJS(self)Create the stubs and return them as a string.
|
_handleClientRequest(self)Handle the request from the client and execute the method/function requested from the client.
|
| Class Variable Details |
|---|
ARGUMENT
|
COMMAND
|
GET
|
POST
|
_AjaxStub__CALLBACK
|
_AjaxStub__cgiMethods
|
_AjaxStub__REGEX
|
_FAILURE
|
_RESULT
|
_STATUS
|
_SUCCESS
|
| Trees | Index | Help |
|
|---|
| Generated by Epydoc 2.1 on Fri Aug 3 23:25:20 2007 | http://epydoc.sf.net |