System.Web.Services.AJAX
[ class tree: System.Web.Services.AJAX ] [ index: System.Web.Services.AJAX ] [ all elements ]

Class: TCallbackServer

Source Location: /Web/Services/AJAX/TCallbackServer.php

Class Overview

TAjaxServer
   |
   --TRemoteObjectServer
      |
      --TCallbackServer

Callback server class.

Class Details

[line 35]
Callback server class.

Callback server hooks AJAX remote object requests into the Prado page life cycle. Form input data are automatically de-marshalled (unserialized).




version:  $Revision: 1.7 $ $Date: 2005/11/10 23:43:26 $
author:  Wei Zhuo<weizhuo[at]gmail[dot]com>


[ Top ]

Variables

Methods


Inherited Variables

Inherited Methods

Class: TRemoteObjectServer

TRemoteObjectServer::handleRequest()
Handles AJAX client javascript and actual AJAX requests.

Class: TAjaxServer

TAjaxServer::__construct()
Create a new server for a particular URI.
TAjaxServer::displayClient()
Displays the remote object javascript proxy code.
TAjaxServer::getJsSrc()
Returns the source URL for the client-side proxy code.
TAjaxServer::getStubGenerator()
Returns the remote object stub code generator.
TAjaxServer::getUri()
Gets the server URI.
TAjaxServer::handleError()
Passes error details to the client-side by throwing an exception.
TAjaxServer::handleException()
Passes exception details to the client-side javascript via JSON.
TAjaxServer::handleRequest()
Handle the AJAX request.
TAjaxServer::invoke()
Invoke the remote object proxy, thus calling the method on the requested object. The results return from the method call are marshalled into JSON and send as part of HTTP header 'X-JSON'.
TAjaxServer::register()
Register an object or class for remote method calls by client-side javascript.
TAjaxServer::serve()
Serve AJAX remote object requests.
TAjaxServer::setUri()
Sets the server URI.

Class Variables

$NS =  "__CALLBACK"

[line 41]

Service namespace.



access:  protected

Type:   string
Overrides:   Array


[ Top ]

$posts =

[line 47]

List of inputs that are posted during an AJAX request.



access:  protected

Type:   TCollection


[ Top ]

$request =

[line 59]

Callback request



access:  protected

Type:   TCallbackRequest


[ Top ]

$response =

[line 53]

Callback response.



access:  protected

Type:   TAjaxResponse


[ Top ]



Class Methods


constructor __construct [line 65]

TCallbackServer __construct( [string $uri = null])

Create a new callback server.



access:  public


Overrides TAjaxServer::__construct() (Create a new server for a particular URI.)

Parameters:

string   $uri   server URI.

[ Top ]

method flush [line 132]

void flush( )

Return the callback request by flushing the response.



access:  public


[ Top ]

method getPostIDs [line 104]

TCollection getPostIDs( )

Returns the form input IDs that are returned for each callback request.



return:  input IDs returned on callback.
access:  public


[ Top ]

method getRequest [line 86]

TAjaxRequest getRequest( )

Returns the callback request.



return:  request info
access:  public


[ Top ]

method getResponse [line 77]

TCallbackResponse getResponse( )

Returns the callback response.



access:  public


[ Top ]

method getStubGenerator [line 113]

TCallbackStub getStubGenerator( )

Get the callback stub generator.



access:  protected


Overrides TAjaxServer::getStubGenerator() (Returns the remote object stub code generator.)

[ Top ]

method initialize [line 94]

void initialize( )

Initialize the callback server. Create a new callback request.



access:  public


[ Top ]

method isCallbackRequest [line 143]

boolean isCallbackRequest( )

Returns true if the callback request.



return:  true if callback request, false otherwise.
access:  public


[ Top ]

method serve [line 123]

void serve( )

Call the proxy method.

Data returned from the proxy method is saved into TCallback::$data.




access:  protected


Overrides TAjaxServer::serve() (Serve AJAX remote object requests.)

[ Top ]


© 2004-2005 PRADO Software Group. All Rights Reserved.