SecurePlayLibray J2SE
v2.1

com.SecurePlay
Class SPTMultistepTurnClass

java.lang.Object
  extended bycom.SecurePlay.SPRootTransactionClass
      extended bycom.SecurePlay.SPAbstractTransactionClass
          extended bycom.SecurePlay.SPTMultistepTurnClass
All Implemented Interfaces:
SPAbstractTransactionInterface

public class SPTMultistepTurnClass
extends SPAbstractTransactionClass

This is implements the multistep transaction. See details under Abstract Transaction Class

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
private static java.lang.String mt_sendStep
          Static message types that this transaction supports.
private  java.util.Vector prdataList
          This property holds an array of multistep turns stored in the order that they are received.
private  java.lang.String[] prdatasourceList
          This array holds the sender/source of the multistep turns.
 
Fields inherited from class com.SecurePlay.SPAbstractTransactionClass
AGE, configuration, gameinstance, mt_completeTransaction, mt_error, privateflag, releaseversion, status_error, status_ready, transactionstatus, transtype
 
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
private SPTMultistepTurnClass()
          Default Constructor
  SPTMultistepTurnClass(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String transactionID, java.lang.String AGE, java.lang.String[] configarr)
          Overloaded Constructor
 
Method Summary
 SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj, SPMessageClass message)
          Creates a new instance of an SPTMultiStepTurnClass class.
 int APIgetStepCount()
          This method returns the current number of steps that have been sent.
 java.lang.String[] APIgetStepData(int step)
          This method returns the dataList entry associated with the specified step value
 java.lang.String APIgetStepSource(int step)
          This method returns the PlayerID of the sender of a specific transaction step.
 java.lang.String APIgetTransactionType()
          This method returns a String of the transactiontype.
 boolean APIsendStep(java.lang.String sender, java.lang.String[] dataentry)
          This method sends a transaction step to the other transaction participants.
static SPAbstractTransactionInterface createMultiStep(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String AGE, java.lang.String[] configarr)
          This method creates a SPTMultiStepTurnClass transaction.
 java.util.Vector getPrdataList()
          Getter function that returns the property: prdataList
 java.lang.String[] getPrdatasourceList()
          Getter function that returns the property: prdatasourceList
static java.lang.String gettranstype()
          This method gets the transaction type.
 boolean onsendStep(SPMessageClass incoming)
          This method handles incoming sendStep requests.
 boolean pronincomingTransaction(SPMessageClass incoming)
          This method provides the unique handlers for incoming Multistep turn message types
static boolean registerTransaction()
          Registers this transaction.
 
Methods inherited from class com.SecurePlay.SPAbstractTransactionClass
APIcompleteTransaction, APIgetAGE, APIgetConfiguration, APIgetGameinstance, APIgetPrivacyFlag, APIgetTransactionstatus, APIisPlayerInternal, APIisTransError, APIsetTransactionID, logError, onincomingTransaction, prinit, pruniqueinit, setAGE
 
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

prdataList

private java.util.Vector prdataList
This property holds an array of multistep turns stored in the order that they are received. Each step does count as a Basic Game Transaction Step. Ordering, control, and other features are countrolled by the game rules. This is essentially a sample generic transaction. Creation of new transactions will require coordination with IT GlobalSecure/SecurePlay as specified in the SecurePlay license.


prdatasourceList

private java.lang.String[] prdatasourceList
This array holds the sender/source of the multistep turns. Please see the prdataList description for additional details.


mt_sendStep

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

See Also:
Constant Field Values
Constructor Detail

SPTMultistepTurnClass

private SPTMultistepTurnClass()
Default Constructor


SPTMultistepTurnClass

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

Parameters:
gameobj -
master -
playerIDList -
privateflag -
transactionID -
Method Detail

APIgetStepData

public java.lang.String[] APIgetStepData(int step)
This method returns the dataList entry associated with the specified step value

Parameters:
step - int - steps
Returns:
result - String[] - step data in a String array of a specified step

APIgetStepSource

public java.lang.String APIgetStepSource(int step)
This method returns the PlayerID of the sender of a specific transaction step.

Parameters:
step - int - the step
Returns:
result - String - PlayerID of sender of a specified step

APIsendStep

public boolean APIsendStep(java.lang.String sender,
                           java.lang.String[] dataentry)
This method sends a transaction step to the other transaction participants. This is a generic transaction step with no special processing. Any participant in a transaction can send such a step.

Parameters:
sender - String - id of the sender
dataentry - String[] - data of the step in a String array
Returns:
result - Boolean: TRUE, if request successfully sent, FALSE, if not

onsendStep

public boolean onsendStep(SPMessageClass incoming)
This method handles incoming sendStep requests. It processes them to ensure they are valid and ensures that the information is stored appropriately.

Parameters:
incoming - SPMessageClass - incoming message
Returns:
result - Boolean: TRUE, if successfully handled, FALSE, if not

pronincomingTransaction

public boolean pronincomingTransaction(SPMessageClass incoming)
This method provides the unique handlers for incoming Multistep turn message types

Overrides:
pronincomingTransaction in class SPAbstractTransactionClass
Parameters:
incoming - SPMessageClass - incoming message
Returns:
result - Boolean: TRUE, if successfully handled, FALSE, if not

APIgetStepCount

public int APIgetStepCount()
This method returns the current number of steps that have been sent. If it fails, it will return -1.

Returns:
stepcount - int - number of steps

getPrdataList

public java.util.Vector getPrdataList()
Getter function that returns the property: prdataList

Returns:
prdataList - List

getPrdatasourceList

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

Returns:
prdatasourceList - String[]

gettranstype

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

Returns:
String

registerTransaction

public static boolean registerTransaction()
Registers this transaction.

Returns:
boolean

createMultiStep

public static SPAbstractTransactionInterface createMultiStep(SPGameInterface gameobj,
                                                             java.lang.String master,
                                                             java.lang.String[] playerIDList,
                                                             boolean privateflag,
                                                             java.lang.String AGE,
                                                             java.lang.String[] configarr)
This method creates a SPTMultiStepTurnClass transaction.

Parameters:
gameobj -
master -
playerIDList -
privateflag -
AGE -
configarr -
Returns:
SPAbstractTransactionInterface - returns Multistep class created

APIcreateTransaction

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

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

APIgetTransactionType

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

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

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.