SecurePlayLibray J2SE
v2.1

com.SecurePlay
Class SPTSynchronizedRandomClass

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

public class SPTSynchronizedRandomClass
extends SPTMultiPartSimultaneousClass

This class is an extension of the SPTMultiPartSimultaneous Class to create random events over a network without a full random transaction.

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

Field Summary
private  int eventcount
          This property is the number of random events drawn.
private  int randomrange
          This property is the range of random event values.
private  boolean replacement
          This property determines whether the random events are with or withour replacement.
 
Fields inherited from class com.SecurePlay.SPTMultiPartSimultaneousClass
status_allreceived, status_allsent, status_secretrevealed, status_secretrevealedlist, status_secretsent
 
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
SPTSynchronizedRandomClass()
          Default Constructor.
SPTSynchronizedRandomClass(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String transactionID, java.lang.String AGE, int dsize, int ecount, boolean replace)
          Specific Constructor.
 
Method Summary
 SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj, SPMessageClass message)
          This creates a SPTSynchronizedRandomClass transaction from an incoming message.
 int APIgetEventCount()
           
 int[] APIgetRandom()
          This method returns the combined random number from the transaction participants
 int APIgetRandomRange()
           
 boolean APIgetReplacement()
           
 java.lang.String APIgetTransactionType()
          This method returns a String of the transactiontype.
 boolean APIsendHiddenSecret(java.lang.String sender, boolean manflag)
          This method allows the specified transaction participant to send the transform of a secret to the other participants in the Simultaneous transaction.
 boolean APIsendHiddenSecret(java.lang.String sender, boolean manflag, java.lang.String[] newsecret)
          This method allows the specified transaction participant to send the transform of a secret to the other participants in the Simultaneous transaction.
private  boolean configSynchRan(java.lang.String sender, int dsize, int ecount, boolean replace)
          Configures this SPTSynchronizedRandomClass
static SPAbstractTransactionInterface createMultiPartSimultaneous(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String transactionID, java.lang.String AGE, java.lang.String[] configarr)
          OVERRIDE - OVERRIDE - OVERRIDE - OVERRIDE - OVERRIDE This method creates a SPTSimultaneousClass transaction.
static SPAbstractTransactionInterface createSynchronizedRandom(SPGameInterface gameobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String AGE, int dsize, int ecount, boolean replace)
          This method creates a SPTSimultaneousClass transaction.
static java.lang.String gettranstype()
          Retusn the transaction type.
static boolean registerTransaction()
          Registers this transaction.
 
Methods inherited from class com.SecurePlay.SPTMultiPartSimultaneousClass
APIgetSecret, APIrevealSecret, APIverifySimultaneous, createMultiPartSimultaneous, getPrpadlength, getSecret, getSecrettransform, onrevealSecret, onsendHiddenSecret, pronincomingTransaction, pruniqueinit
 
Methods inherited from class com.SecurePlay.SPAbstractTransactionClass
APIcompleteTransaction, APIgetAGE, APIgetConfiguration, APIgetGameinstance, APIgetPrivacyFlag, APIgetTransactionstatus, APIisPlayerInternal, APIisTransError, APIsetTransactionID, logError, onincomingTransaction, prinit, 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

randomrange

private int randomrange
This property is the range of random event values.


eventcount

private int eventcount
This property is the number of random events drawn.


replacement

private boolean replacement
This property determines whether the random events are with or withour replacement.

Constructor Detail

SPTSynchronizedRandomClass

public SPTSynchronizedRandomClass()
Default Constructor.


SPTSynchronizedRandomClass

public SPTSynchronizedRandomClass(SPGameInterface gameobj,
                                  java.lang.String master,
                                  java.lang.String[] playerIDList,
                                  boolean privateflag,
                                  java.lang.String transactionID,
                                  java.lang.String AGE,
                                  int dsize,
                                  int ecount,
                                  boolean replace)
Specific Constructor.

Parameters:
gameobj -
master -
playerIDList -
privateflag -
transactionID -
AGE -
dsize -
ecount -
replace -
Method Detail

APIsendHiddenSecret

public boolean APIsendHiddenSecret(java.lang.String sender,
                                   boolean manflag)
This method allows the specified transaction participant to send the transform of a secret to the other participants in the Simultaneous transaction.

Parameters:
sender - String - sender of the secret
manflag - - boolean - manual resolve flag.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIsendHiddenSecret

public boolean APIsendHiddenSecret(java.lang.String sender,
                                   boolean manflag,
                                   java.lang.String[] newsecret)
Description copied from class: SPTMultiPartSimultaneousClass
This method allows the specified transaction participant to send the transform of a secret to the other participants in the Simultaneous transaction.

Overrides:
APIsendHiddenSecret in class SPTMultiPartSimultaneousClass
Parameters:
sender - String - sender of the secret
manflag - - boolean - manual reveal of secret
newsecret - String[] - the secret
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIgetRandom

public int[] APIgetRandom()
This method returns the combined random number from the transaction participants

Returns:
int[] result - combined random value

registerTransaction

public static boolean registerTransaction()
Registers this transaction.

Returns:
boolean

gettranstype

public static java.lang.String gettranstype()
Retusn the transaction type.

Returns:
synchrandom

configSynchRan

private boolean configSynchRan(java.lang.String sender,
                               int dsize,
                               int ecount,
                               boolean replace)
Configures this SPTSynchronizedRandomClass

Parameters:
sender -
dsize -
ecount -
replace -
Returns:
boolean

APIgetTransactionType

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

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

createSynchronizedRandom

public static SPAbstractTransactionInterface createSynchronizedRandom(SPGameInterface gameobj,
                                                                      java.lang.String master,
                                                                      java.lang.String[] playerIDList,
                                                                      boolean privateflag,
                                                                      java.lang.String AGE,
                                                                      int dsize,
                                                                      int ecount,
                                                                      boolean replace)
This method creates a SPTSimultaneousClass transaction.

Parameters:
gameobj -
master -
playerIDList -
privateflag -
AGE -
dsize -
ecount -
replace -
Returns:
SPAbstractTransactionInterface - returns SynchronizedRandom transaction.

APIcreateTransaction

public SPAbstractTransactionInterface APIcreateTransaction(SPGameInterface gameapiobj,
                                                           SPMessageClass message)
This creates a SPTSynchronizedRandomClass transaction from an incoming message.

Specified by:
APIcreateTransaction in interface SPAbstractTransactionInterface
Overrides:
APIcreateTransaction in class SPTMultiPartSimultaneousClass
Parameters:
gameapiobj - SPGameInterface - Associated Game Object
message - SPMessageClass - message class that has all the configure info
Returns:
- result - SPAbstractTransactionInterface - upcast from SPTSynchronizedRandomClass

createMultiPartSimultaneous

public static SPAbstractTransactionInterface createMultiPartSimultaneous(SPGameInterface gameobj,
                                                                         java.lang.String master,
                                                                         java.lang.String[] playerIDList,
                                                                         boolean privateflag,
                                                                         java.lang.String transactionID,
                                                                         java.lang.String AGE,
                                                                         java.lang.String[] configarr)
OVERRIDE - OVERRIDE - OVERRIDE - OVERRIDE - OVERRIDE This method creates a SPTSimultaneousClass transaction.

Parameters:
gameobj -
master -
playerIDList -
privateflag -
transactionID -
AGE -
configarr -
Returns:
SPAbstractTransactionInterface - returns null OVERRIDE.

APIgetEventCount

public int APIgetEventCount()

APIgetRandomRange

public int APIgetRandomRange()

APIgetReplacement

public boolean APIgetReplacement()

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.