More progress.

Created adapters for invocation services so that I can do inner-class like
things by passing references to private functions out to an external entity.
I will see if it's possible to merge my adapter with the marshallers
because it's still to have multiple wrappy classes.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3944 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Ray Greenwell
2006-03-14 03:22:38 +00:00
parent 9195817853
commit 7c842a7e11
15 changed files with 1303 additions and 168 deletions
@@ -0,0 +1,28 @@
package com.threerings.presents.client {
public class InvocationAdapter
implements InvocationListener
{
/**
* Construct an InvocationAdapter that will call the specified
* function on error.
*/
public function InvocationAdapter (failedFunc :Function, args :Array = null)
{
_failedFunc = failedFunc;
_args = args;
}
// documentation inherited from interface InvocationListener
public function requestFailed (cause :String) :void
{
_failedFunc(cause, _args);
}
/** The Function to call when we've recevied our failure response. */
protected var _failedFunc :Function;
/** Any other extra information to pass along to the function. */
protected var _args :Array;
}
}