|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.SecurePlay.SPRootTransactionClass
com.SecurePlay.SPAbstractTransactionClass
com.SecurePlay.SPTSecret.SPTSecretClass
This class implements the Secret Transaction type - the ability for a single party, the Transaction Master, to send a single secret to other participants in a non-refutable fashion. The Secret is committed to irrevokably at the time it is initially sent in hidden form and then can be subsequently revealed.
![]() |
![]() |
![]() |
![]() |
| Field Summary |
| Fields inherited from class com.SecurePlay.SPAbstractTransactionClass |
classAPI, configuration, gameblock, gameinstance, transactionstatus, transtype |
| Fields inherited from class com.SecurePlay.SPRootTransactionClass |
EventListenerList, gameID, master, playerIDList, transactionID |
| Constructor Summary | |
SPTSecretClass(SPGameInterface gameobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
Overloaded Constructor |
|
| Method Summary | |
static boolean |
APIBcreateTransaction(SPGameAPIClass gapi,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
This method allows the creation of a new Secret type, internally controlled transaction. |
static SPTSecretClass |
APIcreateTransaction(SPGameAPIClass gapi,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
This method allows the creation of a new Secret type, internally controlled transaction. |
java.lang.String |
APIgetSecret()
This method returns the actual secret that this transaction is protecting, if available. |
boolean |
APIrequestrevealSecret(java.lang.String pid,
java.lang.String[] receivers,
java.lang.String liststatus)
This method allows a third party player to request that the secret be revealed by the transaction master to the specified receiver list. |
boolean |
APIrequestsendHiddenSecret(java.lang.String pid,
java.lang.String newsecret)
This method allows a non-transaction master to request the transaction master send a Secret. |
boolean |
APIrevealSecret(java.lang.String sender,
java.lang.String[] recievers,
java.lang.String liststatus)
This method sends the secretpadded value to the specified remote players. |
boolean |
APIsendHiddenSecret(java.lang.String sender,
java.lang.String newsecret)
This method allows the Secret Transaction master to send the transform of a secret to the other participants in the transaction. |
static SPTSecretAPIClass |
APITAOcreateTransaction(SPGameAPIClass gapi,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
This method allows the creation of a new Secret type, internally controlled transaction. |
boolean |
APIverifySecret()
This method verifies the paddedsecret that was sent. |
protected SPAbstractTransactionInterface |
buildSPawn()
This method provides the unique transaction creation services for spawned Secret transactions |
SPAbstractTransactionInterface |
createTransaction(SPGameAPIInterface gameapiobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
This method creates a SPSecretClass transaction. |
int |
getPrpadlength()
Getter function that returns the property: prpadlength |
java.lang.String |
getSecretpadded()
Getter function that returns the property: secretpadded |
java.lang.String |
getSecrettransform()
Getter function that returns the property: secrettransform |
static java.lang.String |
gettranstype()
This method gets the transaction type. |
void |
onrequestrevealSecret(SPMessageClass incoming)
This method handles incoming requests for the transaction master to create a revealSecret message to the specified receivers. |
void |
onrequestsendHiddenSecret(SPMessageClass incoming)
Handles incoming requests to create a sendHiddenSecret message |
boolean |
onrevealSecret(SPMessageClass incoming)
This method handles the incoming message to reveal a secret. |
boolean |
onsendHiddenSecret(SPMessageClass incoming)
This method handles incoming sendHiddenSecret messages. |
boolean |
pronincomingTransaction(SPMessageClass incoming)
This method provides the unique handlers for incoming Secret turn message types |
static boolean |
registerTransaction()
Registers this transaction. |
protected boolean |
spawnConfigure(SPAbstractTransactionInterface a)
This method provides the unique transaction configuration services for spawned Secret transactions |
SPTSecretAPIClass |
SPgetAPI()
Gets this class's API |
| Methods inherited from class com.SecurePlay.SPRootTransactionClass |
APIAddListener, APIClearListeners, APIGetListenerCount, APIGetListeners, APIRemoveListener, getGameID, getMaster, getPlayerIDList, getTransactionID, isPlayerIncluded, 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 |
getGameID, getMaster, getPlayerIDList, getTransactionID |
| Constructor Detail |
public SPTSecretClass(SPGameInterface gameobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
gameobj - SPGameInterface - the game object to which this transaction will be associated withmaster - String - the master of this transactionplayerIDList - String[] - players who will be associated with this transactionprivateflag - boolean - private flag of this transactiontransactionID - String - the id of this transaction| Method Detail |
public boolean APIsendHiddenSecret(java.lang.String sender,
java.lang.String newsecret)
sender - String - the sender of the hidden secretnewsecret - String - the secret message
public boolean APIrevealSecret(java.lang.String sender,
java.lang.String[] recievers,
java.lang.String liststatus)
sender - String - the sender of the secretrecievers - String[] - player ids of recieversliststatus - String - "P" or "L"
public boolean APIverifySecret()
public java.lang.String APIgetSecret()
public boolean onsendHiddenSecret(SPMessageClass incoming)
incoming - SPMessageClass - incoming message
public boolean onrevealSecret(SPMessageClass incoming)
incoming - SPMessageClass - incoming message
public boolean pronincomingTransaction(SPMessageClass incoming)
pronincomingTransaction in class SPAbstractTransactionClassincoming - SPMessageClass - incoming message
public boolean APIrequestsendHiddenSecret(java.lang.String pid,
java.lang.String newsecret)
pid - String - player id of the requestornewsecret - String - the secret to be sent
public void onrequestsendHiddenSecret(SPMessageClass incoming)
incoming - SPMessageClass - incoming message
public boolean APIrequestrevealSecret(java.lang.String pid,
java.lang.String[] receivers,
java.lang.String liststatus)
pid - String - the player id of the requestorreceivers - String[] - player ids of recievers of the secretliststatus - String - status of the list
public void onrequestrevealSecret(SPMessageClass incoming)
incoming - SPMessageClass - incoming messageprotected SPAbstractTransactionInterface buildSPawn()
buildSPawn in class SPAbstractTransactionClassprotected boolean spawnConfigure(SPAbstractTransactionInterface a)
spawnConfigure in class SPAbstractTransactionClassa - SPAbstractTransactionInterface - the transaction to be spawned
public SPTSecretAPIClass SPgetAPI()
public int getPrpadlength()
public java.lang.String getSecretpadded()
public java.lang.String getSecrettransform()
public static SPTSecretClass APIcreateTransaction(SPGameAPIClass gapi,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
gapi - SPGameAPIInterface - the game that will be associated with this transaction.transmaster - String - player id of the master of the transactionplayerIDList - String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.privateflag - boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
public static boolean APIBcreateTransaction(SPGameAPIClass gapi,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
gapi - SPGameAPIInterface - the game that will be associated with this transaction.transmaster - String - player id of the master of the transactionplayerIDList - String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.privateflag - boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
public static SPTSecretAPIClass APITAOcreateTransaction(SPGameAPIClass gapi,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
gapi - SPGameAPIInterface - the game that will be associated with this transaction.transmaster - String - player id of the master of the transactionplayerIDList - String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.privateflag - boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
public static java.lang.String gettranstype()
public static boolean registerTransaction()
public SPAbstractTransactionInterface createTransaction(SPGameAPIInterface gameapiobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
createTransaction in interface SPAbstractTransactionInterfacecreateTransaction in class SPAbstractTransactionClassgameapiobj - SPGameAPIInterface - the game that will be associated with this transaction.master - String - player id of the master of the transactionplayerIDList - String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.privateflag - boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.transactionID - String - transaction id.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||