SecurePlayLibray J2SE
v2.1

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
(package private)  SPCommsManagerClass comms
          This is the SPcomms instance associated with the game instance.
(package private)  java.util.Vector EventListenerList
          This holds the list of objects that listen to events from the transaction or game object
(package private)  java.lang.String gameID
          If associated with a transaction: This property is the identifier of the game instance with which the transaction is associated.
(package private)  SPMap insend
          This map contains the incoming message senders and the associated most recent message ID.
(package private)  java.lang.String master
          If associated with a transaction: This is the PlayerID of the player that is the master of this transaction.
(package private)  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.
(package private)  java.lang.String releaseversion
          IT GlobalSecure release version.
(package private)  java.lang.String[] ReSend_altmessage
          Data from Last message sent, only used by resend message and send message
(package private)  boolean ReSend_encryptflag
          Data from Last message sent, only used by resend message and send message
(package private)  java.lang.String[] ReSend_messagebody
          Data from Last message sent, only used by resend message and send message
(package private)  java.lang.String ReSend_messageID
          Data from Last message sent, is the message ID of the previously sent message
(package private)  java.lang.String ReSend_messagetype
          Data from Last message sent, only used by resend message and send message
(package private)  boolean ReSend_privateflag
          Data from Last message sent, only used by resend message and send message
(package private)  java.lang.String[] ReSend_receivers
          Data from Last message sent, only used by resend message and send message
(package private)  java.lang.String ReSend_sender
          Data from Last message sent, only used by resend message and send message
(package private)  SecurePlayClass secureplay
          This property holds the SecurePlayClass associted with this transaction.
(package private)  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 listener)
          This method adds a listener object for events
 boolean APIclearListeners()
          This method clears the listener objects for events
 java.lang.String APIgetGameID()
          Gets the game id associated with the transaction or game.
 SPMap APIgetGetReplayList()
          This method returns the relay data list.
 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
 java.lang.String APIgetMaster()
          Gets the master of the transaction or game
 java.lang.String[] APIgetPlayerIDList()
          Gets the player id list of the players associated with the transaction or the game.
 java.lang.String APIgetTransactionID()
          Gets the transaction id.
 boolean APIisPlayerIncluded(java.lang.String pid)
          This method tests to determine if a specified player is a transaction participant.
 boolean APIremoveListener(SPEventInterface listener)
          This method removes a listener object for events
 boolean APIReplayRemoveOldSender(java.lang.String sender)
          This method removes an older sender from the replay list.
 void APIresendLastMessage()
          This method resends the last message sent by retrieveing the data stored of the last message.
 void APIsetReplayList(SPMap m)
          This method sets the relay data list.
 boolean APIsetSecurePlayClass(SecurePlayClass sp)
          This method sets the SecurePlayClass associated with this SPRootTransactionClass
 boolean detectReplay(SPMessageClass incoming)
          This checks to see if there is a replay problem.
private  void SecurePlayClassWideNotify(java.lang.String eventdescription, java.lang.String[] args, java.lang.String sourceMethod, java.lang.String sourceClass, java.lang.String errorType)
          This method notifies the library wide listeners.
 void sendMessage(java.lang.String sender, java.lang.String[] receivers, boolean encryptflag, boolean privateflag, java.lang.String messagetype, java.lang.String[] messagebody, java.lang.String[] altmessage)
          This method actually constructs messages to be sent by the Game object to other game object instances via the Comms Manager
 void SPnotify(java.lang.String eventdescription, java.lang.String[] args, java.lang.String sourceMethod, java.lang.String sourceClass, java.lang.String errorType)
          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

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

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

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


master

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

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


insend

SPMap insend
This map contains the incoming message senders and the associated most recent message ID.


secureplay

SecurePlayClass secureplay
This property holds the SecurePlayClass associted with this transaction.


comms

SPCommsManagerClass comms
This is the SPcomms instance associated with the game instance. It is used to access the communications manager services to send and receive and process messages.


ReSend_sender

java.lang.String ReSend_sender
Data from Last message sent, only used by resend message and send message


ReSend_receivers

java.lang.String[] ReSend_receivers
Data from Last message sent, only used by resend message and send message


ReSend_encryptflag

boolean ReSend_encryptflag
Data from Last message sent, only used by resend message and send message


ReSend_privateflag

boolean ReSend_privateflag
Data from Last message sent, only used by resend message and send message


ReSend_messagetype

java.lang.String ReSend_messagetype
Data from Last message sent, only used by resend message and send message


ReSend_messagebody

java.lang.String[] ReSend_messagebody
Data from Last message sent, only used by resend message and send message


ReSend_altmessage

java.lang.String[] ReSend_altmessage
Data from Last message sent, only used by resend message and send message


ReSend_messageID

java.lang.String ReSend_messageID
Data from Last message sent, is the message ID of the previously sent message


releaseversion

final java.lang.String releaseversion
IT GlobalSecure release version.

Constructor Detail

SPRootTransactionClass

public SPRootTransactionClass()
Default Constructor

Method Detail

APIgetGameID

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

Returns:
gid - String - game id

APIsetSecurePlayClass

public boolean APIsetSecurePlayClass(SecurePlayClass sp)
This method sets the SecurePlayClass associated with this SPRootTransactionClass

Parameters:
sp - SecurePlayClass
Returns:
boolean

SecurePlayClassWideNotify

private void SecurePlayClassWideNotify(java.lang.String eventdescription,
                                       java.lang.String[] args,
                                       java.lang.String sourceMethod,
                                       java.lang.String sourceClass,
                                       java.lang.String errorType)
This method notifies the library wide listeners.

Parameters:
eventdescription - String
args - String[]

APIgetTransactionID

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

Returns:
tid - String - the transaction id

APIgetMaster

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

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

APIgetPlayerIDList

public java.lang.String[] APIgetPlayerIDList()
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 listener)
This method adds a listener object for events

Parameters:
listener - SPEventInterface - listener to be added
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIremoveListener

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

Parameters:
listener - SPEventInterface - listener to be removed
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,
                     java.lang.String sourceMethod,
                     java.lang.String sourceClass,
                     java.lang.String errorType)
This method notifies the Listeners of events

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

APIisPlayerIncluded

public boolean APIisPlayerIncluded(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.

detectReplay

public boolean detectReplay(SPMessageClass incoming)
This checks to see if there is a replay problem. It returns TRUE if there is a replay problem

Parameters:
incoming - - SPMessageClass - message to be testd
Returns:
boolean - TRUE if there is a replay problem

sendMessage

public void sendMessage(java.lang.String sender,
                        java.lang.String[] receivers,
                        boolean encryptflag,
                        boolean privateflag,
                        java.lang.String messagetype,
                        java.lang.String[] messagebody,
                        java.lang.String[] altmessage)
This method actually constructs messages to be sent by the Game object to other game object instances via the Comms Manager

Parameters:
sender - - id of the sender
receivers - - ids of the recievers of the message
encryptflag - - encryption flag
privateflag - - private flag
messagetype - - the type of message
messagebody - - the message body
altmessage - - alternative message
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIresendLastMessage

public void APIresendLastMessage()
This method resends the last message sent by retrieveing the data stored of the last message.


APIReplayRemoveOldSender

public boolean APIReplayRemoveOldSender(java.lang.String sender)
This method removes an older sender from the replay list.

Parameters:
sender -
Returns:
boolean

APIgetGetReplayList

public SPMap APIgetGetReplayList()
This method returns the relay data list.

Returns:
SPMap - clones replay list

APIsetReplayList

public void APIsetReplayList(SPMap m)
This method sets the relay data list.

Parameters:
m - - SPMap - data structure for the relay list.

SecurePlayLibray J2SE
v2.1

2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.