Allow bureau clients to report fatal errors if something goes wrong, like oh I don't know... maybe a disconnection perhaps
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@5489 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -38,6 +38,14 @@ public class BureauDirector extends BasicDirector
|
||||
_bureauService.bureauInitialized(_ctx.getClient(), id);
|
||||
}
|
||||
|
||||
/**
|
||||
* Lets the server know that a fatal error has occurred and the bureau needs to be terminated.
|
||||
*/
|
||||
public function fatalError (message :String) :void
|
||||
{
|
||||
_bureauService.bureauError(_ctx.getClient(), message);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new agent when the server requests it.
|
||||
*/
|
||||
|
||||
@@ -38,6 +38,9 @@ public interface BureauService extends InvocationService
|
||||
// from Java interface BureauService
|
||||
function agentDestroyed (arg1 :Client, arg2 :int) :void;
|
||||
|
||||
// from Java interface BureauService
|
||||
function bureauError (arg1 :Client, arg2 :String) :void;
|
||||
|
||||
// from Java interface BureauService
|
||||
function bureauInitialized (arg1 :Client, arg2 :String) :void;
|
||||
}
|
||||
|
||||
@@ -69,8 +69,19 @@ public class BureauMarshaller extends InvocationMarshaller
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch <code>bureauError</code> requests. */
|
||||
public static const BUREAU_ERROR :int = 4;
|
||||
|
||||
// from interface BureauService
|
||||
public function bureauError (arg1 :Client, arg2 :String) :void
|
||||
{
|
||||
sendRequest(arg1, BUREAU_ERROR, [
|
||||
arg2
|
||||
]);
|
||||
}
|
||||
|
||||
/** The method id used to dispatch <code>bureauInitialized</code> requests. */
|
||||
public static const BUREAU_INITIALIZED :int = 4;
|
||||
public static const BUREAU_INITIALIZED :int = 5;
|
||||
|
||||
// from interface BureauService
|
||||
public function bureauInitialized (arg1 :Client, arg2 :String) :void
|
||||
|
||||
Reference in New Issue
Block a user