Finished wiring up oid list tracking; made shutdown() work on the cher

server; added an easy mechanism to write test modules and invoke them on
the server.


git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@192 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
Michael Bayne
2001-08-08 00:28:49 +00:00
parent 91d5813b37
commit 6fe9ad8a6e
7 changed files with 410 additions and 24 deletions
@@ -1,5 +1,5 @@
//
// $Id: AuthManager.java,v 1.3 2001/06/01 22:12:03 mdb Exp $
// $Id: AuthManager.java,v 1.4 2001/08/08 00:28:49 mdb Exp $
package com.threerings.cocktail.cher.server.net;
@@ -55,8 +55,16 @@ public class AuthManager extends LoopingThread
protected void iterate ()
{
// grab the next authing connection from the queue
AuthingConnection aconn = (AuthingConnection)_authq.get();
Object item = _authq.get();
// if we're being kicked and requested to exit, we'll just post
// some bogus item on the queue to wake up the auth manager and
// get him the hell out of dodge
if (!(item instanceof AuthingConnection)) {
return;
}
AuthingConnection aconn = (AuthingConnection)item;
try {
// instruct the authenticator to process the auth request
AuthResponse rsp = _author.process(aconn.getAuthRequest());
@@ -74,6 +82,12 @@ public class AuthManager extends LoopingThread
}
}
protected void kick ()
{
// we post something bogus to the queue to wake up the authmgr
_authq.append(new Integer(0));
}
protected Authenticator _author;
protected ConnectionManager _conmgr;
protected Queue _authq = new Queue();