|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is the interface for all Game classes
![]() |
![]() |
![]() |
![]() |
| Method Summary | |
boolean |
addComms(java.lang.String commsID)
This method associates a comms service specified by the commsID string to a game instance. |
boolean |
addPlayer(java.lang.String pid)
This method safely adds an existing Player, specified by the playerID to the game instance. |
boolean |
addTransaction(SPAbstractTransactionInterface transObj)
This safely adds a transaction to a game instance and appropriately updates the game state. |
boolean |
attach(java.lang.String gid,
SecurePlayClass lib,
java.lang.String master,
boolean signaturepolicy,
boolean encryptionpolicy,
SPLogInterface log,
SPSecurityManagerInterface security)
This method attaches an empty game object instance and configures it for use in the SecurePlay library as a game NOTE: This method does not set the classAPI because it is an attached game. |
boolean |
closeTransaction(java.lang.String transID)
Safely removes a transaction from a game instance. |
boolean |
gameComplete()
This method allows external entities to review the status of the game instance without directly accessing its internals. |
SPCommsManagerClass |
getCommsManager()
Gets the comms manager object |
SPGameAPIInterface |
getGameAPI()
This method returns the handler for the Game API object. |
java.lang.String |
getGameID()
Gets the game id |
SPPlayerInterface |
getGamePlayer(java.lang.String playerID)
This method returns the player object specified by the playerID. |
SPAbstractTransactionInterface |
getGameTransaction(java.lang.String tid)
This method returns a specific transaction associated with a given game instance. |
java.lang.String |
getMaster()
Gets the master |
java.lang.String[] |
getPlayerIDList()
Gets the player id list |
SecurePlayClass |
getSecurePlay()
This method returns the unique SecurePlay library object associated with the game instance object. |
SPSecurityManagerInterface |
getSecurityManager()
This method returns the security manager class associated with this game. |
java.lang.String |
getTransactionID()
Gets the transaction id |
boolean |
incrementBasicGameTransactionCount(int count)
This method increments the game’s transaction counter to support certain licensing models |
boolean |
isPlayerInternal(java.lang.String pid)
Checks to see if the player is internal |
boolean |
onendGame(SPMessageClass messObj)
This method safely ends the local game instance. |
void |
onIncomingTransaction(SPMessageClass messObj)
This method is the generic handler for incoming Game transaction methods. |
boolean |
removeComms(java.lang.String commsID)
This method removes the association of a communications service with a game instance. |
boolean |
removePlayer(java.lang.String pid)
This method safely removes a Player instance from an existing Game Instance. |
boolean |
setPlayerComms(java.lang.String playerID,
java.lang.String commsID,
boolean relayflag)
This method associates a specific player instance, specified by the playerID, with a specific communications service, specified by the commsID. |
byte[] |
SPcreateBHash(java.lang.String input,
java.lang.String gameid)
This is a wrapper function for creating a hash of a string. |
byte[] |
SPcreateBSignature(java.lang.String senderID,
byte[] input,
java.lang.String gameid)
This is a wrapper function for creating a digital signature based on an existing hashed string and a Sender ID. |
java.lang.String |
SPcreateHash(java.lang.String input,
java.lang.String gameid)
This is a wrapper function for creating a hash of a string. |
java.lang.String |
SPcreateSignature(java.lang.String senderID,
java.lang.String input,
java.lang.String gameid)
This is a wrapper function for creating a digital signature based on an existing hashed string and a Sender ID. |
java.lang.String[] |
SPdecrypt(java.lang.String[] input,
java.lang.String senderID,
java.lang.String[] recvrs,
java.lang.String gameID,
java.lang.String messageID)
This is a placeholder for an decryption function. |
java.lang.String[] |
SPencrypt(java.lang.String[] input,
java.lang.String senderID,
java.lang.String[] recvrs,
java.lang.String gameID,
java.lang.String messageID)
This is a placeholder for an encryption function. |
void |
SPnotify(java.lang.String eventdescription,
java.lang.String[] args)
This method notifies the Listeners of events |
boolean |
SPverifySignature(byte[] sigToVerify,
java.lang.String senderID,
byte[] testhash,
java.lang.String gameid)
This is a wrapper for a digital signature verification function. |
boolean |
SPverifySignature(java.lang.String signature,
java.lang.String senderID,
java.lang.String testhash,
java.lang.String gameid)
This is a wrapper for a digital signature verification function. |
boolean |
transactionincluded(java.lang.String tid)
This method checks the specified transaction ID against the currently included transaction IDs in the game instance. |
| Method Detail |
public SPGameAPIInterface getGameAPI()
public boolean addPlayer(java.lang.String pid)
pid - String - the id of the player to be added
public boolean removePlayer(java.lang.String pid)
pid - String - id of the player to be removed
public boolean setPlayerComms(java.lang.String playerID,
java.lang.String commsID,
boolean relayflag)
playerID - String - id of the player to be addedcommsID - String - id of the comms object to be addedrelayflag - Boolean - relay flag
public SPPlayerInterface getGamePlayer(java.lang.String playerID)
playerID - String - the id of the player to get
public boolean gameComplete()
public boolean addComms(java.lang.String commsID)
commsID - String - id of the comms to be added
public boolean removeComms(java.lang.String commsID)
commsID - String - id of the comms to be removed
public boolean addTransaction(SPAbstractTransactionInterface transObj)
transObj - SPAbstractTransactionInterface - the transaction Object handler
public boolean closeTransaction(java.lang.String transID)
transID - String - the id of the transaction to be closed
public SPAbstractTransactionInterface getGameTransaction(java.lang.String tid)
tid - String - identifier for transaction object
public boolean transactionincluded(java.lang.String tid)
tid - String - the id of the transaction in question
public boolean incrementBasicGameTransactionCount(int count)
count - int - number of increments
public void onIncomingTransaction(SPMessageClass messObj)
messObj - SPMessageClass - incoming Message Objectpublic boolean isPlayerInternal(java.lang.String pid)
pid - String - id of the player to be checked
public boolean attach(java.lang.String gid,
SecurePlayClass lib,
java.lang.String master,
boolean signaturepolicy,
boolean encryptionpolicy,
SPLogInterface log,
SPSecurityManagerInterface security)
gid - String - game idlib - SecurePlayClass - the secure play librarymaster - String - the master of the gamesignaturepolicy - boolean - signature policyencryptionpolicy - boolean - encryption policylog - security - public java.lang.String getGameID()
public boolean onendGame(SPMessageClass messObj)
messObj - SPMessageClass - incoming Message Object
* @return result - Boolean: TRUE, if successful, FALSE, if notpublic java.lang.String[] getPlayerIDList()
public SPCommsManagerClass getCommsManager()
public java.lang.String getMaster()
public java.lang.String getTransactionID()
public SecurePlayClass getSecurePlay()
public byte[] SPcreateBHash(java.lang.String input,
java.lang.String gameid)
input - String
public byte[] SPcreateBSignature(java.lang.String senderID,
byte[] input,
java.lang.String gameid)
senderID - Stringinput - Stringgameid - String
public java.lang.String SPcreateHash(java.lang.String input,
java.lang.String gameid)
input - String
public java.lang.String SPcreateSignature(java.lang.String senderID,
java.lang.String input,
java.lang.String gameid)
senderID - Stringinput - Stringgameid - String
public java.lang.String[] SPdecrypt(java.lang.String[] input,
java.lang.String senderID,
java.lang.String[] recvrs,
java.lang.String gameID,
java.lang.String messageID)
input - String[] - input message body to be decryptedsenderID - String - sender idrecvrs - String[] - receiver id listgameID - String - game idmessageID - String - message id
public java.lang.String[] SPencrypt(java.lang.String[] input,
java.lang.String senderID,
java.lang.String[] recvrs,
java.lang.String gameID,
java.lang.String messageID)
input - String[] - message body to be encryptedsenderID - String - sender idrecvrs - String[] - receiver id listgameID - String - game idmessageID - String - message id
public boolean SPverifySignature(byte[] sigToVerify,
java.lang.String senderID,
byte[] testhash,
java.lang.String gameid)
sigToVerify - byte[]senderID - Stringtesthash - String
public boolean SPverifySignature(java.lang.String signature,
java.lang.String senderID,
java.lang.String testhash,
java.lang.String gameid)
signature - StringsenderID - Stringtesthash - String
public SPSecurityManagerInterface getSecurityManager()
public void SPnotify(java.lang.String eventdescription,
java.lang.String[] args)
eventdescription - args - - String[] - arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||