Files
narya/src/as/com/threerings/presents/dobj/SubscriberAdapter.as
T
Ray Greenwell 64d7f32178 Lots of debug logging, some casting.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4001 542714f4-19e9-0310-aa3c-eee0fc999fb1
2006-04-06 20:05:28 +00:00

31 lines
749 B
ActionScript

package com.threerings.presents.dobj {
import com.threerings.presents.Log;
public class SubscriberAdapter
implements Subscriber
{
public function SubscriberAdapter (success :Function, failure :Function)
{
_success = success;
_failure = failure;
}
// documentation inherited from interface Subscriber
public function objectAvailable (obj :DObject) :void
{
Log.debug("calling success function: " + _success);
_success(obj);
}
// documentation inherited from interface Subscriber
public function requestFailed (oid :int, cause :ObjectAccessError) :void
{
_failure(oid, cause);
}
protected var _success :Function;
protected var _failure :Function;
}
}