com.SecurePlay
Class SPPlayerClass

java.lang.Object
  extended bycom.SecurePlay.SPPlayerClass
All Implemented Interfaces:
SPPlayerInterface

public class SPPlayerClass
extends java.lang.Object
implements SPPlayerInterface

A player or participant in a game

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Constructor Summary
SPPlayerClass()
           
SPPlayerClass(java.lang.String playerID)
          Constructs an overloaded instance of SPPlayerClass.
SPPlayerClass(java.lang.String playerID, boolean internalflag)
          Constructs an overloaded instance of SPPlayerClass.
 
Method Summary
 boolean addGame(SPGameInterface gameObj)
          This method adds a game association to a player object.
 boolean clearPlayer()
          This function safely removes a player's association with all games - it can only be done if this will not damage any ongoing games.
 boolean configurePlayerPID(java.lang.String pid)
          This method sets the Player ID for a previously created Player object to associate it with a SecurePlay library.
 java.lang.String[] getGameIDList()
          Getter function that returns the property: gameIDList
 java.lang.String getPlayerID()
          This method returns the Player ID for the current player instance
 boolean isInternal()
          Returns the status of the internalflag
 void logerror()
          This is a placeholder for future logging support.
 boolean removeGame(SPGameInterface gameObj)
          This method removes an assocation between a Player and a Game Instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPPlayerClass

public SPPlayerClass()

SPPlayerClass

public SPPlayerClass(java.lang.String playerID,
                     boolean internalflag)
Constructs an overloaded instance of SPPlayerClass.

Parameters:
playerID - String - player id
internalflag - - boolean - internal flag

SPPlayerClass

public SPPlayerClass(java.lang.String playerID)
Constructs an overloaded instance of SPPlayerClass.

Parameters:
playerID - String - player id
Method Detail

getPlayerID

public java.lang.String getPlayerID()
Description copied from interface: SPPlayerInterface
This method returns the Player ID for the current player instance

Specified by:
getPlayerID in interface SPPlayerInterface
Returns:
str - String - the Player ID

isInternal

public boolean isInternal()
Description copied from interface: SPPlayerInterface
Returns the status of the internalflag

Specified by:
isInternal in interface SPPlayerInterface
Returns:
flag - Boolean: TRUE, if successful, FALSE, if not

addGame

public boolean addGame(SPGameInterface gameObj)
Description copied from interface: SPPlayerInterface
This method adds a game association to a player object. It will return TRUE if the game is newly added or already associated with the Player. This method should not be called directly, it should be called through the Game instance.

Specified by:
addGame in interface SPPlayerInterface
Parameters:
gameObj - SPGameInterface(actual object) - game object handler, the game to be added
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

removeGame

public boolean removeGame(SPGameInterface gameObj)
Description copied from interface: SPPlayerInterface
This method removes an assocation between a Player and a Game Instance. This method should not be called directly, it should be called through the game instance.

Specified by:
removeGame in interface SPPlayerInterface
Parameters:
gameObj - SPGameInterface(actual object) - game object handler, the game to be removed
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

clearPlayer

public boolean clearPlayer()
Description copied from interface: SPPlayerInterface
This function safely removes a player's association with all games - it can only be done if this will not damage any ongoing games. If any associations cannot be closed, it will return FALSE

Specified by:
clearPlayer in interface SPPlayerInterface
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

logerror

public void logerror()
This is a placeholder for future logging support.


configurePlayerPID

public boolean configurePlayerPID(java.lang.String pid)
Description copied from interface: SPPlayerInterface
This method sets the Player ID for a previously created Player object to associate it with a SecurePlay library.

Specified by:
configurePlayerPID in interface SPPlayerInterface
Parameters:
pid - String - id of the player to be configured
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

getGameIDList

public java.lang.String[] getGameIDList()
Getter function that returns the property: gameIDList

Returns:
gameIDList - String[]