com.electrotank.electroserver4.extensions.api
Class GameManagerResponse

java.lang.Object
  extended by com.electrotank.electroserver4.extensions.api.GameManagerResponse

public class GameManagerResponse
extends Object

GameManagerResponse is an object returned by the GameManager. Typically this is in response to an ElectroServerApi.createGameForUsers request, and indicates the success or failure of the call.

See Also:
ElectroServerApi.createGameForUsers, ElectroServer 4 Manual, Game Manager

Constructor Summary
GameManagerResponse(boolean isSuccessful, com.electrotank.electroserver4.enumerations.ErrorType error)
          Creates a new instance of GameManagerResponse.
GameManagerResponse(boolean isSuccessful, int gameId, int zoneId, int roomId, EsObjectRO gameDetails)
          Creates a new instance of GameManagerResponse.
 
Method Summary
 com.electrotank.electroserver4.enumerations.ErrorType getError()
          Used to get the error for the request
 EsObjectRO getGameDetails()
          Used to get a read-only copy of the gameDetails
 int getGameId()
          Used to get the gameId
 int getRoomId()
          Used to get the roomId
 int getZoneId()
          Used to get the zoneId
 boolean isSuccessful()
          Used to get the isSuccessful field of the object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GameManagerResponse

public GameManagerResponse(boolean isSuccessful,
                           int gameId,
                           int zoneId,
                           int roomId,
                           EsObjectRO gameDetails)
Creates a new instance of GameManagerResponse. This constructor is suitable for a successful response.

Parameters:
isSuccessful - if true, the request was successful.
gameId - gameId of the game
zoneId - zoneId of the room for the game
roomId - roomId for the game
gameDetails - a read-only EsObject with any game details
See Also:
EsObjectRO, ElectroServer 4 Manual, Game Manager

GameManagerResponse

public GameManagerResponse(boolean isSuccessful,
                           com.electrotank.electroserver4.enumerations.ErrorType error)
Creates a new instance of GameManagerResponse. This constructor is suitable for a nonsuccessful response.

Parameters:
isSuccessful - if true, the request was successful.
error - an ErrorType object, with details on the error
See Also:
ElectroServer 4 Manual, Game Manager
Method Detail

isSuccessful

public boolean isSuccessful()
Used to get the isSuccessful field of the object.

Returns:
true if the request was successful

getError

public com.electrotank.electroserver4.enumerations.ErrorType getError()
Used to get the error for the request

Returns:
ErrorType object

getZoneId

public int getZoneId()
Used to get the zoneId

Returns:
zoneId

getRoomId

public int getRoomId()
Used to get the roomId

Returns:
roomId

getGameDetails

public EsObjectRO getGameDetails()
Used to get a read-only copy of the gameDetails

Returns:
gameDetails as an EsObjectRO object
See Also:
EsObjectRO

getGameId

public int getGameId()
Used to get the gameId

Returns:
gameId


Copyright © 2007 Electrotank, Inc. All Rights Reserved.