Progress on Ye Olde Parlor services.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@363 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
//
|
||||
// $Id: ParlorManager.java,v 1.1 2001/10/01 02:56:35 mdb Exp $
|
||||
|
||||
package com.threerings.parlor.server;
|
||||
|
||||
import com.samskivert.util.Config;
|
||||
|
||||
import com.threerings.cocktail.cher.server.InvocationManager;
|
||||
import com.threerings.parlor.client.ParlorService;
|
||||
|
||||
/**
|
||||
* The parlor manager is responsible for the parlor services in
|
||||
* aggregate. This includes maintaining the registry of active games,
|
||||
* handling the necessary coordination for the matchmaking services and
|
||||
* anything else that falls outside the scope of an actual in-progress
|
||||
* game.
|
||||
*/
|
||||
public class ParlorManager
|
||||
{
|
||||
/**
|
||||
* Initializes the parlor manager. This should be called by the server
|
||||
* that is making use of the parlor services on the single instance of
|
||||
* parlor manager that it has created.
|
||||
*
|
||||
* @param config the configuration object in use by this server.
|
||||
* @param invmgr a reference to the invocation manager in use by this
|
||||
* server.
|
||||
*/
|
||||
public void init (Config config, InvocationManager invmgr)
|
||||
{
|
||||
// register our invocation provider
|
||||
ParlorProvider pprov = new ParlorProvider(this);
|
||||
invmgr.registerProvider(ParlorService.MODULE, pprov);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
//
|
||||
// $Id: ParlorProvider.java,v 1.1 2001/10/01 02:56:35 mdb Exp $
|
||||
|
||||
package com.threerings.parlor.server;
|
||||
|
||||
import com.threerings.cocktail.cher.server.InvocationProvider;
|
||||
import com.threerings.cocktail.party.data.BodyObject;
|
||||
|
||||
import com.threerings.parlor.data.GameConfig;
|
||||
|
||||
/**
|
||||
* The parlor provider handles the server side of the various Parlor
|
||||
* services that are made available for direct invocation by the client.
|
||||
* Primarily these are the matchmaking mechanisms.
|
||||
*/
|
||||
public class ParlorProvider extends InvocationProvider
|
||||
{
|
||||
/**
|
||||
* Constructs a parlor provider instance which will be used to handle
|
||||
* all parlor-related invocation service requests. This is
|
||||
* automatically taken care of by the parlor manager, so no other
|
||||
* entity need instantiate and register a parlor provider.
|
||||
*
|
||||
* @param pmgr a reference to the parlor manager active in this
|
||||
* server.
|
||||
*/
|
||||
public ParlorProvider (ParlorManager pmgr)
|
||||
{
|
||||
_pmgr = pmgr;
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes a request from the client to invite another user to play
|
||||
* a game.
|
||||
*/
|
||||
public void handleInviteRequest (
|
||||
BodyObject source, int invid, String invitee, GameConfig config)
|
||||
{
|
||||
}
|
||||
|
||||
/** A reference to the parlor manager we're working with. */
|
||||
protected ParlorManager _pmgr;
|
||||
}
|
||||
Reference in New Issue
Block a user