Confirm our start puzzle requests.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3056 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: PuzzleService.java,v 1.2 2004/06/22 14:08:58 mdb Exp $
|
// $Id: PuzzleService.java,v 1.3 2004/07/10 04:17:21 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.puzzle.client;
|
package com.threerings.puzzle.client;
|
||||||
|
|
||||||
@@ -31,7 +31,7 @@ public interface PuzzleService extends InvocationService
|
|||||||
* puzzle.
|
* puzzle.
|
||||||
*/
|
*/
|
||||||
public void startPuzzle (Client client, SolitairePuzzleConfig config,
|
public void startPuzzle (Client client, SolitairePuzzleConfig config,
|
||||||
InvocationListener listener);
|
ConfirmListener listener);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Requests that this client enter the specified puzzle.
|
* Requests that this client enter the specified puzzle.
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
//
|
//
|
||||||
// $Id: PuzzleMarshaller.java,v 1.2 2004/06/22 14:08:58 mdb Exp $
|
// $Id: PuzzleMarshaller.java,v 1.3 2004/07/10 04:17:21 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.puzzle.data;
|
package com.threerings.puzzle.data;
|
||||||
|
|
||||||
import com.threerings.crowd.data.PlaceConfig;
|
import com.threerings.crowd.data.PlaceConfig;
|
||||||
import com.threerings.presents.client.Client;
|
import com.threerings.presents.client.Client;
|
||||||
import com.threerings.presents.client.InvocationService.InvocationListener;
|
import com.threerings.presents.client.InvocationService.ConfirmListener;
|
||||||
import com.threerings.presents.data.InvocationMarshaller;
|
import com.threerings.presents.data.InvocationMarshaller;
|
||||||
import com.threerings.presents.dobj.InvocationResponseEvent;
|
import com.threerings.presents.dobj.InvocationResponseEvent;
|
||||||
import com.threerings.puzzle.client.PuzzleService;
|
import com.threerings.puzzle.client.PuzzleService;
|
||||||
@@ -57,9 +57,9 @@ public class PuzzleMarshaller extends InvocationMarshaller
|
|||||||
public static final int START_PUZZLE = 1;
|
public static final int START_PUZZLE = 1;
|
||||||
|
|
||||||
// documentation inherited from interface
|
// documentation inherited from interface
|
||||||
public void startPuzzle (Client arg1, SolitairePuzzleConfig arg2, InvocationListener arg3)
|
public void startPuzzle (Client arg1, SolitairePuzzleConfig arg2, ConfirmListener arg3)
|
||||||
{
|
{
|
||||||
ListenerMarshaller listener3 = new ListenerMarshaller();
|
ConfirmMarshaller listener3 = new ConfirmMarshaller();
|
||||||
listener3.listener = arg3;
|
listener3.listener = arg3;
|
||||||
sendRequest(arg1, START_PUZZLE, new Object[] {
|
sendRequest(arg1, START_PUZZLE, new Object[] {
|
||||||
arg2, listener3
|
arg2, listener3
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
//
|
//
|
||||||
// $Id: PuzzleDispatcher.java,v 1.2 2004/06/22 14:08:58 mdb Exp $
|
// $Id: PuzzleDispatcher.java,v 1.3 2004/07/10 04:17:21 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.puzzle.server;
|
package com.threerings.puzzle.server;
|
||||||
|
|
||||||
import com.threerings.crowd.data.PlaceConfig;
|
import com.threerings.crowd.data.PlaceConfig;
|
||||||
import com.threerings.presents.client.Client;
|
import com.threerings.presents.client.Client;
|
||||||
import com.threerings.presents.client.InvocationService.InvocationListener;
|
import com.threerings.presents.client.InvocationService.ConfirmListener;
|
||||||
import com.threerings.presents.data.ClientObject;
|
import com.threerings.presents.data.ClientObject;
|
||||||
import com.threerings.presents.data.InvocationMarshaller;
|
import com.threerings.presents.data.InvocationMarshaller;
|
||||||
import com.threerings.presents.server.InvocationDispatcher;
|
import com.threerings.presents.server.InvocationDispatcher;
|
||||||
@@ -44,7 +44,7 @@ public class PuzzleDispatcher extends InvocationDispatcher
|
|||||||
case PuzzleMarshaller.START_PUZZLE:
|
case PuzzleMarshaller.START_PUZZLE:
|
||||||
((PuzzleProvider)provider).startPuzzle(
|
((PuzzleProvider)provider).startPuzzle(
|
||||||
source,
|
source,
|
||||||
(SolitairePuzzleConfig)args[0], (InvocationListener)args[1]
|
(SolitairePuzzleConfig)args[0], (ConfirmListener)args[1]
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
//
|
//
|
||||||
// $Id: PuzzleProvider.java,v 1.4 2004/06/22 14:08:58 mdb Exp $
|
// $Id: PuzzleProvider.java,v 1.5 2004/07/10 04:17:21 mdb Exp $
|
||||||
|
|
||||||
package com.threerings.puzzle.server;
|
package com.threerings.puzzle.server;
|
||||||
|
|
||||||
import com.threerings.util.Name;
|
import com.threerings.util.Name;
|
||||||
|
|
||||||
import com.threerings.presents.client.InvocationService.InvocationListener;
|
import com.threerings.presents.client.InvocationService;
|
||||||
import com.threerings.presents.data.ClientObject;
|
import com.threerings.presents.data.ClientObject;
|
||||||
import com.threerings.presents.dobj.RootDObjectManager;
|
import com.threerings.presents.dobj.RootDObjectManager;
|
||||||
import com.threerings.presents.server.InvocationException;
|
import com.threerings.presents.server.InvocationException;
|
||||||
@@ -46,7 +46,7 @@ public class PuzzleProvider
|
|||||||
*/
|
*/
|
||||||
public void startPuzzle (
|
public void startPuzzle (
|
||||||
ClientObject caller, SolitairePuzzleConfig config,
|
ClientObject caller, SolitairePuzzleConfig config,
|
||||||
InvocationListener listener)
|
InvocationService.ConfirmListener listener)
|
||||||
throws InvocationException
|
throws InvocationException
|
||||||
{
|
{
|
||||||
BodyObject user = (BodyObject)caller;
|
BodyObject user = (BodyObject)caller;
|
||||||
@@ -63,7 +63,9 @@ public class PuzzleProvider
|
|||||||
GameManager gmgr = (GameManager)_plreg.createPlace(config, null);
|
GameManager gmgr = (GameManager)_plreg.createPlace(config, null);
|
||||||
|
|
||||||
// the game manager will take care of notifying the player
|
// the game manager will take care of notifying the player
|
||||||
// that the game has been created once it has been started up
|
// that the game has been created once it has been started up;
|
||||||
|
// but we let the caller know that we processed their request
|
||||||
|
listener.requestProcessed();
|
||||||
|
|
||||||
} catch (InstantiationException ie) {
|
} catch (InstantiationException ie) {
|
||||||
Log.warning("Error instantiating puzzle manager " +
|
Log.warning("Error instantiating puzzle manager " +
|
||||||
|
|||||||
Reference in New Issue
Block a user