64d7f32178
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@4001 542714f4-19e9-0310-aa3c-eee0fc999fb1
31 lines
749 B
ActionScript
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;
|
|
}
|
|
}
|