com.SecurePlay.SPTSecret
Class SPTSecretAPIClass

java.lang.Object
  extended bycom.SecurePlay.SPAbstractTransactionAPIClass
      extended bycom.SecurePlay.SPTSecret.SPTSecretAPIClass
All Implemented Interfaces:
SPAbstractTransactionAPIInterface

public class SPTSecretAPIClass
extends SPAbstractTransactionAPIClass

API version of SPSecretClass

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

Field Summary
 
Fields inherited from class com.SecurePlay.SPAbstractTransactionAPIClass
transactioninstance
 
Constructor Summary
SPTSecretAPIClass(SPTSecretClass secretinstance)
          Overloaded Constructor
 
Method Summary
 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.
 boolean APIverifySecret()
          This method verifies the paddedsecret that was sent.
 boolean rulesrevealSecret(java.lang.String sender, java.lang.String[] receivers, java.lang.String liststatus, SPTSecretClass transobj)
          This shell method is a pluggable function to allow the override of handing incoming requests to reveal a Secret by the transaction master.
 boolean rulessendHiddenSecret(java.lang.String sender, java.lang.String newsecret, SPTSecretClass transobj)
          This method handles incoming requests to send Hidden Secrets
 
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

SPTSecretAPIClass

public SPTSecretAPIClass(SPTSecretClass secretinstance)
Overloaded Constructor

Parameters:
secretinstance -
Method Detail

APIgetSecret

public java.lang.String APIgetSecret()
This method returns the actual secret that this transaction is protecting, if available.

Returns:
result - String - the secret

APIrequestrevealSecret

public 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. This method is mainly used for remote debugging.

Parameters:
pid - String - the player id of the requestor
receivers - String[] - player ids of recievers of the secret
liststatus - String - status of the list
Returns:
result - Boolean: TRUE, if request successfully sent, FALSE, if not

APIrequestsendHiddenSecret

public 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. It is mainly used for remote debugging purposes.

Parameters:
pid - String - player id of the requestor
newsecret - String - the secret to be sent
Returns:
result - Boolean: TRUE, if request successfully sent, FALSE, if not

APIrevealSecret

public 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.

Parameters:
sender - String - the sender of the secret
recievers - String[] - player ids of recievers
liststatus - String - "P" or "L"
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIsendHiddenSecret

public 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.

Parameters:
sender - String - the sender of the hidden secret
newsecret - String - the secret message
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

APIverifySecret

public boolean APIverifySecret()
This method verifies the paddedsecret that was sent. It computes the transform of the paddedsecret that has been sent and compares it with the previously sent secrettransform. It returns a Boolean flag to indicate success or failure.

Returns:
result - Boolean: TRUE, if able to verify secret, FALSE, if not

rulesrevealSecret

public boolean rulesrevealSecret(java.lang.String sender,
                                 java.lang.String[] receivers,
                                 java.lang.String liststatus,
                                 SPTSecretClass transobj)
This shell method is a pluggable function to allow the override of handing incoming requests to reveal a Secret by the transaction master. It is mainly used for remote debugging purposes.

Parameters:
sender -
receivers -
liststatus -
transobj -
Returns:
boolean - TRUE, if allowed or boolean FALSE, if not

rulessendHiddenSecret

public boolean rulessendHiddenSecret(java.lang.String sender,
                                     java.lang.String newsecret,
                                     SPTSecretClass transobj)
This method handles incoming requests to send Hidden Secrets

Parameters:
sender -
newsecret -
transobj -
Returns:
String - newsecret, if Successful, BOOLEAN FALSE, if not