com.SecurePlay.SPTMultistepTurn
Class SPTMultistepTurnAPIClass

java.lang.Object
  extended bycom.SecurePlay.SPAbstractTransactionAPIClass
      extended bycom.SecurePlay.SPTMultistepTurn.SPTMultistepTurnAPIClass
All Implemented Interfaces:
SPAbstractTransactionAPIInterface

public class SPTMultistepTurnAPIClass
extends SPAbstractTransactionAPIClass

API version of SPMultistepturnClass

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
 
Fields inherited from class com.SecurePlay.SPAbstractTransactionAPIClass
transactioninstance
 
Constructor Summary
SPTMultistepTurnAPIClass(SPTMultistepTurnClass multi)
          Overloaded Constructor
 
Method Summary
 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.
 boolean APIrequestsendStep(java.lang.String pid, java.lang.String sender, java.lang.String[] dataentry)
          This shell request method remotely requests another player to send a transaction step
 boolean APIsendStep(java.lang.String sender, java.lang.String[] dataentry)
          This method sends a transaction step to the other transaction participants.
 boolean rulessendStep(java.lang.String pid, java.lang.String sender, java.lang.String[] body, SPTMultistepTurnClass transobj)
          This shell method handles remote requests to send a transaction step for the Multistep transaction.
 
Methods inherited from class com.SecurePlay.SPAbstractTransactionAPIClass
APIAddListener, APIbeginTransaction, APIClearListeners, APIcompleteTransaction, APIconfigureTransaction, APIGetListenerCount, APIGetListeners, APIRemoveListener, APIrequestbeginTransaction, APIrequestCompleteTransaction, APIrequestconfigureTransaction, APISPawn, getTransactioninstance, rulesbeginTransaction, rulescompleteTransaction, rulesconfigureTransaction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPTMultistepTurnAPIClass

public SPTMultistepTurnAPIClass(SPTMultistepTurnClass multi)
Overloaded Constructor

Parameters:
multi - SPMultistepTurnClass - multistep turn class
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

APIrequestsendStep

public boolean APIrequestsendStep(java.lang.String pid,
                                  java.lang.String sender,
                                  java.lang.String[] dataentry)
This shell request method remotely requests another player to send a transaction step

Parameters:
pid - String - player id, the master
sender - Stirng - sender id
dataentry - String[] - the data of the step
Returns:
result - Boolean: TRUE, if request successfully sent, FALSE, if not

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

APIgetStepCount

public int APIgetStepCount()
This method returns the current number of steps that have been sent

Returns:
stepcount - int - number of steps

rulessendStep

public boolean rulessendStep(java.lang.String pid,
                             java.lang.String sender,
                             java.lang.String[] body,
                             SPTMultistepTurnClass transobj)
This shell method handles remote requests to send a transaction step for the Multistep transaction. It is principally used for remote debugging purposes.

Parameters:
pid - String - player id, master
sender - String - player id, sender
body - String[] - body of the step as a String array
transobj - SPMultistepTurnClass - the multustep transaction
Returns:
result - boolean: TRUE if allowed or FALSE, if not permitted