SecurePlayLibray J2SE
v2.1

com.SecurePlay
Class SPAbstractTransactionClass

java.lang.Object
  extended bycom.SecurePlay.SPRootTransactionClass
      extended bycom.SecurePlay.SPAbstractTransactionClass
All Implemented Interfaces:
SPAbstractTransactionInterface
Direct Known Subclasses:
SPTBlastClass, SPTBurstClass, SPTMultiPartSecretClass, SPTMultiPartSimultaneousClass, SPTMultistepTurnClass, SPTRandomClass, SPTSecretClass, SPTShipClass, SPTSimultaneousClass, SPTStrobeClass

public class SPAbstractTransactionClass
extends SPRootTransactionClass
implements SPAbstractTransactionInterface

This is the common abstract transaction class for all transactions in the SecurePlay library

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

Field Summary
(package private)  java.lang.String AGE
          Abstract Game Engine or code associated with this transaction
(package private)  java.lang.String[] configuration
          This property holds the configuration of the Transaction Instance.
(package private)  SPGameInterface gameinstance
          This is the object handler for the Game Instance Object with which the transaction is associated.
(package private) static java.lang.String mt_completeTransaction
          Static message types that this transaction supports.
(package private) static java.lang.String mt_error
          Static message types that this transaction supports.
(package private)  boolean privateflag
          This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
(package private)  java.lang.String releaseversion
          IT GlobalSecure release version.
(package private) static java.lang.String status_error
          transaction status error variable
(package private) static java.lang.String status_ready
          transaction status ready variable
(package private)  java.lang.String transactionstatus
          This is a string that describes the current state of the transaction.
(package private)  java.lang.String transtype
          Type of Transaction
 
Fields inherited from class com.SecurePlay.SPRootTransactionClass
comms, EventListenerList, gameID, insend, master, playerIDList, ReSend_altmessage, ReSend_encryptflag, ReSend_messagebody, ReSend_messageID, ReSend_messagetype, ReSend_privateflag, ReSend_receivers, ReSend_sender, secureplay, transactionID
 
Constructor Summary
SPAbstractTransactionClass()
          Default Constructor.
SPAbstractTransactionClass(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String transactionID, java.lang.String AGE, java.lang.String[] configarr)
          Constructor.
 
Method Summary
 boolean APIcompleteTransaction(java.lang.String pid)
          This method allows the Transaction Master ONLY to complete the transaction.
 SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj, SPMessageClass message)
          Creates a new instance of an Abstract Transaction class.
 java.lang.String APIgetAGE()
          Gets the Abstract Game Engine (AGE) of this transaction.
 java.lang.String[] APIgetConfiguration()
          Getter function that returns the property: configuration
 SPGameInterface APIgetGameinstance()
          Getter function that returns the property: gameinstance
 boolean APIgetPrivacyFlag()
          Gets the privacy flag of this class.
 java.lang.String APIgetTransactionstatus()
          Getter function that returns the property: transactionstatus
 java.lang.String APIgetTransactionType()
          This method returns a String of the transactiontype.
 boolean APIisPlayerInternal(java.lang.String pid)
          Checks to see if the playr is internal
 boolean APIisTransError()
          This method returns a flag for whether the status of the transaction is in error or not.
 void APIsetTransactionID(java.lang.String tid)
          Sets the transaction id to a specified id.
private  void completeTransaction(java.lang.String sourceid)
          This method allows the Transaction Master ONLY to complete the transaction.
static java.lang.String gettranstype()
          This method gets the transaction type.
 void logError()
          This is a shell method for future use.
private  void onCompleteTransaction(SPMessageClass incoming)
          This method allows the Transaction Master ONLY to complete the transaction.
 void onincomingTransaction(SPMessageClass incoming)
          This method handles the various incoming messages and passes them to the appropriate message type handler.
protected  void prinit(SPGameInterface gameobj, java.lang.String masterID, java.lang.String[] plrIDList, boolean prvtflag, java.lang.String transID)
          Initializes the transaction.
protected  boolean pronincomingTransaction(SPMessageClass incoming)
          this is a shell for unique incoming transactions
protected  void pruniqueinit()
          shell to allow unique initialization of transactions
protected  boolean setAGE(java.lang.String sourceID, java.lang.String newgameblock)
          This method safely sets the abstract game engine of a transaction.
 
Methods inherited from class com.SecurePlay.SPRootTransactionClass
APIaddListener, APIclearListeners, APIgetGameID, APIgetGetReplayList, APIgetListenerCount, APIgetListeners, APIgetMaster, APIgetPlayerIDList, APIgetTransactionID, APIisPlayerIncluded, APIremoveListener, APIReplayRemoveOldSender, APIresendLastMessage, APIsetReplayList, APIsetSecurePlayClass, detectReplay, sendMessage, SPnotify
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.SecurePlay.SPAbstractTransactionInterface
APIgetGameID, APIgetMaster, APIgetPlayerIDList, APIgetTransactionID, sendMessage
 

Field Detail

gameinstance

SPGameInterface gameinstance
This is the object handler for the Game Instance Object with which the transaction is associated.


privateflag

boolean privateflag
This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.


transactionstatus

java.lang.String transactionstatus
This is a string that describes the current state of the transaction. The common states are "new" - a newly created transaction, "configured" - a custom configured transaction, "ready" - a transaction ready to be begun, "complete" - a successfully completed transaction, and "error" - a transaction that has failed for some reason.


configuration

java.lang.String[] configuration
This property holds the configuration of the Transaction Instance.


AGE

java.lang.String AGE
Abstract Game Engine or code associated with this transaction


transtype

java.lang.String transtype
Type of Transaction


mt_completeTransaction

static final java.lang.String mt_completeTransaction
Static message types that this transaction supports.

See Also:
Constant Field Values

mt_error

static final java.lang.String mt_error
Static message types that this transaction supports.

See Also:
Constant Field Values

status_ready

static final java.lang.String status_ready
transaction status ready variable

See Also:
Constant Field Values

status_error

static final java.lang.String status_error
transaction status error variable

See Also:
Constant Field Values

releaseversion

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

Constructor Detail

SPAbstractTransactionClass

public SPAbstractTransactionClass()
Default Constructor.


SPAbstractTransactionClass

public SPAbstractTransactionClass(SPGameInterface gameobj,
                                  java.lang.String master,
                                  java.lang.String[] playerIDList,
                                  boolean privateflag,
                                  java.lang.String transactionID,
                                  java.lang.String AGE,
                                  java.lang.String[] configarr)
Constructor.

Parameters:
gameobj - SPGameInterface - game associated with this transaction.
master - String - master of this transaction.
playerIDList - String[] - player id list associated with this transaction.
privateflag - boolean - privacy flag.
transactionID - String - ID associated with this transaction.
Method Detail

prinit

protected void prinit(SPGameInterface gameobj,
                      java.lang.String masterID,
                      java.lang.String[] plrIDList,
                      boolean prvtflag,
                      java.lang.String transID)
Initializes the transaction.

Parameters:
gameobj -
masterID -
plrIDList -
prvtflag -
transID -

pruniqueinit

protected void pruniqueinit()
shell to allow unique initialization of transactions


APIcompleteTransaction

public boolean APIcompleteTransaction(java.lang.String pid)
This method allows the Transaction Master ONLY to complete the transaction. Transactions that are in an error state cannot be cleared by completion.

Specified by:
APIcompleteTransaction in interface SPAbstractTransactionInterface
Parameters:
pid - String - id of the player who is completing the transaction, must be the master and internal.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

completeTransaction

private void completeTransaction(java.lang.String sourceid)
This method allows the Transaction Master ONLY to complete the transaction. Transactions that are in an error state cannot be cleared by completion.

Parameters:
sourceid - String - source id
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

onCompleteTransaction

private void onCompleteTransaction(SPMessageClass incoming)
This method allows the Transaction Master ONLY to complete the transaction. Transactions that are in an error state cannot be cleared by completion.

Parameters:
incoming - SPMessageClass - incomng message
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

onincomingTransaction

public void onincomingTransaction(SPMessageClass incoming)
This method handles the various incoming messages and passes them to the appropriate message type handler.

Specified by:
onincomingTransaction in interface SPAbstractTransactionInterface
Parameters:
incoming - SPMessageClass - incomng message
Returns:
void

APIisTransError

public boolean APIisTransError()
This method returns a flag for whether the status of the transaction is in error or not.

Returns:
result - Boolean: TRUE if transaction in error state, FALSE, if not.

pronincomingTransaction

protected boolean pronincomingTransaction(SPMessageClass incoming)
this is a shell for unique incoming transactions

Parameters:
incoming - SPMessageClass - incoming message
Returns:
Boolean - TRUE if successful, FALSE, if unsuccessful

APIisPlayerInternal

public boolean APIisPlayerInternal(java.lang.String pid)
Checks to see if the playr is internal

Parameters:
pid - String - id of the player to be checked.
Returns:
result - Boolean: TRUE if player is internal, FALSE if not

logError

public void logError()
This is a shell method for future use.


APIgetPrivacyFlag

public boolean APIgetPrivacyFlag()
Gets the privacy flag of this class.

Specified by:
APIgetPrivacyFlag in interface SPAbstractTransactionInterface
Returns:
privateflag - boolean

APIsetTransactionID

public void APIsetTransactionID(java.lang.String tid)
Sets the transaction id to a specified id.

Specified by:
APIsetTransactionID in interface SPAbstractTransactionInterface
Parameters:
tid - String - the id of the transaction.

setAGE

protected boolean setAGE(java.lang.String sourceID,
                         java.lang.String newgameblock)
This method safely sets the abstract game engine of a transaction. NOTE: This can only be done by the Transaction master.

Parameters:
sourceID - String - id of the source.
newgameblock - String - candidate game block
Returns:
result - Boolean: TRUE, if successful, FALSE, if not.

APIgetAGE

public java.lang.String APIgetAGE()
Gets the Abstract Game Engine (AGE) of this transaction.

Specified by:
APIgetAGE in interface SPAbstractTransactionInterface
Returns:
gameblock - String

APIgetConfiguration

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

Specified by:
APIgetConfiguration in interface SPAbstractTransactionInterface
Returns:
configuration - String[]

APIgetGameinstance

public SPGameInterface APIgetGameinstance()
Getter function that returns the property: gameinstance

Returns:
gameinstance - SPGameInterface

APIgetTransactionstatus

public java.lang.String APIgetTransactionstatus()
Getter function that returns the property: transactionstatus

Specified by:
APIgetTransactionstatus in interface SPAbstractTransactionInterface
Returns:
transactionstatus - String

APIgetTransactionType

public java.lang.String APIgetTransactionType()
This method returns a String of the transactiontype.

Specified by:
APIgetTransactionType in interface SPAbstractTransactionInterface
Returns:
this.transtype - String - name of transaction type

gettranstype

public static java.lang.String gettranstype()
This method gets the transaction type.

Returns:
String

APIcreateTransaction

public SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj,
                                                           SPMessageClass message)
Creates a new instance of an Abstract Transaction class.

Specified by:
APIcreateTransaction in interface SPAbstractTransactionInterface
Parameters:
gameapiobj - SPGameInterface - game associated with this transaction.
message - SPMessageClass - message that contains all the configure info
Returns:
SPAbstractTransactionInterface

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.