com.SecurePlay
Class SPRootTransactionClass

java.lang.Object
  extended bycom.SecurePlay.SPRootTransactionClass
Direct Known Subclasses:
SPAbstractTransactionClass, SPGameClass

public abstract class SPRootTransactionClass
extends java.lang.Object

This abstract class provides the common services for all game and transaction types.

Author:
IT GlobalSecure Inc.
See Also:
SecurePlay License Information
 

Field Summary
protected  java.util.Vector EventListenerList
          This holds the list of objects that listen to events from the transaction or game object
protected  java.lang.String gameID
          If associated with a transaction: This property is the identifier of the game instance with which the transaction is associated.
protected  java.lang.String master
          If associated with a transaction: This is the PlayerID of the player that is the master of this transaction.
protected  java.lang.String[] playerIDList
          If associated with a transaction: This is an array that holds the Player IDs of the players within the game that are participating in this transaction.
protected  java.lang.String transactionID
          If associated with a transaction: This property holds the unique identifier for the transaction instance within a game instance.
 
Constructor Summary
SPRootTransactionClass()
          Default Constructor
 
Method Summary
 boolean APIAddListener(SPEventInterface gameobj)
          This method adds a listener object for events
 boolean APIClearListeners()
          This method clears the listener objects for events
 int APIGetListenerCount()
          This method returns the number of listener objects for events
 java.lang.Object[] APIGetListeners()
          This method returns a list of listener objects for events
 boolean APIRemoveListener(SPEventInterface gameobj)
          This method removes a listener object for events
 java.lang.String getGameID()
          Gets the game id associated with the transaction or game.
 java.lang.String getMaster()
          Gets the master of the transaction or game
 java.lang.String[] getPlayerIDList()
          Gets the player id list of the players associated with the transaction or the game.
 java.lang.String getTransactionID()
          Gets the transaction id.
 boolean isPlayerIncluded(java.lang.String pid)
          This method tests to determine if a specified player is a transaction participant.
 void SPnotify(java.lang.String eventdescription, java.lang.String[] args)
          This method notifies the Listeners of events
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

gameID

protected java.lang.String gameID
If associated with a transaction: This property is the identifier of the game instance with which the transaction is associated.


playerIDList

protected java.lang.String[] playerIDList
If associated with a transaction: This is an array that holds the Player IDs of the players within the game that are participating in this transaction.


transactionID

protected java.lang.String transactionID
If associated with a transaction: This property holds the unique identifier for the transaction instance within a game instance.


master

protected java.lang.String master
If associated with a transaction: This is the PlayerID of the player that is the master of this transaction. The master of the transaction is the only entity that can start, configure, or end the transaction.


EventListenerList

protected java.util.Vector EventListenerList
This holds the list of objects that listen to events from the transaction or game object

Constructor Detail

SPRootTransactionClass

public SPRootTransactionClass()
Default Constructor

Method Detail

getGameID

public java.lang.String getGameID()
Gets the game id associated with the transaction or game.

Returns:
gid - String - game id

getTransactionID

public java.lang.String getTransactionID()
Gets the transaction id.

Returns:
tid - String - the transaction id

getMaster

public java.lang.String getMaster()
Gets the master of the transaction or game

Returns:
master - String - returns the id of the master

getPlayerIDList

public java.lang.String[] getPlayerIDList()
Gets the player id list of the players associated with the transaction or the game.

Returns:
players - String[] - players associated with a game or transaction in a String array.

APIAddListener

public boolean APIAddListener(SPEventInterface gameobj)
This method adds a listener object for events

Parameters:
gameobj -
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIRemoveListener

public boolean APIRemoveListener(SPEventInterface gameobj)
This method removes a listener object for events

Parameters:
gameobj -
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIGetListeners

public java.lang.Object[] APIGetListeners()
This method returns a list of listener objects for events

Returns:
a[] - Object[] - gets the array of listener objects

APIClearListeners

public boolean APIClearListeners()
This method clears the listener objects for events

Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIGetListenerCount

public int APIGetListenerCount()
This method returns the number of listener objects for events

Returns:
i - int - returns the number of listeners

SPnotify

public void SPnotify(java.lang.String eventdescription,
                     java.lang.String[] args)
This method notifies the Listeners of events

Parameters:
eventdescription -
args - - String[] - arguments

isPlayerIncluded

public boolean isPlayerIncluded(java.lang.String pid)
This method tests to determine if a specified player is a transaction participant.

Parameters:
pid - String - the player id in question
Returns:
Boolean - TRUE, if player is a transaction participant, FALSE, if not.