|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is the GameAPI class interface
![]() |
![]() |
![]() |
![]() |
| Method Summary | |
boolean |
APIAddListener(SPEventInterface gameobj)
This method adds a listener object for Game API events |
boolean |
APIBcreateTransaction(java.lang.String transtype,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
This method allows the creation of a new, internally controlled transaction. |
boolean |
APIbeginGame(java.lang.String playerID)
This method safely begins the game |
boolean |
APIClearListeners()
This method clears the listener objects for Game API events |
boolean |
APIcloseTransaction(java.lang.String transID)
This method removes a transaction from the game instance's open transaction list. |
SPTBlastClass |
APIcreateBlastTransaction(java.lang.String pid,
java.lang.String[] transcontent)
This method creates a default Blast Transaction for this library. |
SPAbstractTransactionInterface |
APIcreateTransaction(java.lang.String transtype,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
This method allows the creation of a new, internally controlled transaction. |
boolean |
APIendGame(java.lang.String playerID)
This method safely ends a game. |
SPLogInterface |
APIgetGameLog()
Gets the messagelog object from the gameinstance |
java.lang.Object |
APIgetGameLogCurrentEntry()
Returns current entry from the messagelog object of comms |
int |
APIgetGameLogLength()
returns the number entries in messagelog |
java.lang.Object |
APIgetGameLogNextEntry()
Returns the next entry from the messagelog object of comms |
java.lang.Object |
APIgetGameLogPreviousEntry()
Returns the previous entry from the messagelog object of the comms |
java.lang.String |
APIgetLicenseSummary()
This method returns a summary of the licensee information for the current game instance. |
int |
APIGetListenerCount()
This method returns the number of listener objects for Game API events |
java.lang.Object[] |
APIGetListeners()
This method returns a list of listener objects for Game API events |
java.lang.String[] |
APIgetOpenTransactionIDs()
Returns a vector that contains a list of open transaction IDs |
SPPlayerInterface |
APIgetPlayer(java.lang.String pid)
This method gets the player from the game instance using the player ID |
java.lang.String[] |
APIgetPlayerIDList()
This method gets the player id list list associated with this game. |
SPAbstractTransactionInterface |
APIgetTransaction(java.lang.String tid)
This method gets the transaction from the game instance using the transaction ID |
SPAbstractTransactionAPIInterface |
APIgetTransactionAPI(java.lang.String tid)
This method returns the transaction API of the game transaction using sid. |
boolean |
APIPlayerJoin(java.lang.String sender,
java.lang.String pid,
java.lang.String cid)
This method allows the Game instance Master to safely add a new player during the course of a game and to notify the remote players of this information. |
boolean |
APIPlayerJoin(java.lang.String sender,
java.lang.String pid,
java.lang.String cid,
boolean rflag)
This method allows the Game instance Master to safely add a new player during the course of a game and to notify the remote players of this information. |
boolean |
APIRemoveListener(SPEventInterface gameobj)
This method removes a listener object for Game API events |
boolean |
APIrequestbeginGame(java.lang.String playerID)
This method sends a request to the game instance master to begin the game. |
boolean |
APIrequestcreateTransaction(java.lang.String pid,
java.lang.String transmaster,
java.lang.String transtype,
java.lang.String[] playerIDList,
boolean privateflagIN)
This method safely allows a player to request the creation of a new transaction of a given type and parameters. |
boolean |
APIrequestendGame(java.lang.String playerID)
This method sends a message from the specified player to the game instance master to end the game. |
boolean |
APIrequestPlayerJoin(java.lang.String sender,
java.lang.String pid,
java.lang.String cid,
boolean rflagIN)
This method sends a request to a remote game instance to add a player during a game. |
SPAbstractTransactionAPIInterface |
APITAOcreateTransaction(java.lang.String transtype,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
This method allows the creation of a new, internally controlled transaction. |
SPGameClass |
getGameinstance()
Getter function that returns the property: gameinstance |
java.lang.String |
GetNextGameSegmentID(java.lang.String currentsegment)
This method gets automatically called by the Game any time the conditions for a new Game Segment are met according to the SecurePlay Library license. |
boolean |
isPlayerIncluded(java.lang.String pid)
This method tests to determine if a specified player is a transaction participant. |
boolean |
isPlayerInternal(java.lang.String pid)
This method checks to see whether a specified playerID is internal to the local SecurePlay library process |
boolean |
joinPlayer(java.lang.String pid,
java.lang.String cid,
boolean rflag)
This method carries out the local process of adding a new Player to the local game instance. |
void |
onBlast(SPMessageClass messObj)
This method handles incoming new Blast Transactions |
void |
onnewGameBlock(SPMessageClass messObj)
This method handles incoming new Game Blocks |
boolean |
onnewTransaction(SPMessageClass incoming)
This method handles messages for new incoming transactions. |
boolean |
onPlayerJoin(SPMessageClass messObj)
This method safely handles remote messages for the addition of a player to the local game instance. |
boolean |
onrequestcreateTransaction(SPMessageClass incoming)
This method handles incoming requests for the creation of new transactions. |
boolean |
onrequestPlayerJoin(SPMessageClass messObj)
Safely handles requests to add a player. |
boolean |
rulesbeginGame(java.lang.String requesterID)
This is a shell function to allow the insertion of rules code for the decision to begin a game. |
boolean |
rulescreateTransaction(java.lang.String sender,
java.lang.String transtype,
java.lang.String master,
java.lang.String[] players,
boolean pflag)
This method safely allows a player to request the creation of a new transaction of a given type and parameters. |
boolean |
rulesendGame(java.lang.String requesterID)
This is a shell method to allow the evaluation of the game rules to determine if the game should be allowed to end. |
boolean |
rulesnewplayerconfig(java.lang.String pid,
java.lang.String cid,
boolean rflag)
This shell method takes an incoming proposed configuration for a new player and maps it against the local preference for that player, if different. |
boolean |
rulesPlayerJoin(java.lang.String sender,
java.lang.String[] messbody)
This is a shell method to determine if a player will be allowed to join in midgame. |
boolean |
sendMessage(java.lang.String sender,
java.lang.String[] receivers,
boolean encryptflag,
boolean privateflag,
java.lang.String messagetype,
java.lang.String[] messagebody,
java.lang.String[] altmessage)
This method is a wrapper for the game instance sendMessage() method. |
| Method Detail |
public boolean APIbeginGame(java.lang.String playerID)
playerID - String - player id is the master.
public boolean APIendGame(java.lang.String playerID)
playerID - String - player id is the master.
public java.lang.String GetNextGameSegmentID(java.lang.String currentsegment)
currentsegment - String - current game segment, but currently not used because the method is a shell.
public boolean isPlayerInternal(java.lang.String pid)
pid - String - player id to be checked.
public boolean isPlayerIncluded(java.lang.String pid)
pid - String - player id to be checked.
public boolean APIcloseTransaction(java.lang.String transID)
transID - String - transaction id to beremoved.
public SPAbstractTransactionInterface APIcreateTransaction(java.lang.String transtype,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
transtype - String - specified transaction typetransmaster - 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 SPTBlastClass APIcreateBlastTransaction(java.lang.String pid,
java.lang.String[] transcontent)
pid - String - player id.transcontent - String[] - content of this transaction.
public boolean APIBcreateTransaction(java.lang.String transtype,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
transtype - String - specified transaction typetransmaster - 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 SPAbstractTransactionAPIInterface APITAOcreateTransaction(java.lang.String transtype,
java.lang.String transmaster,
java.lang.String[] playerIDList,
boolean privateflag)
transtype - String - specified transaction typetransmaster - 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 boolean onnewTransaction(SPMessageClass incoming)
incoming - SPMessageClass - the incoming message.
public boolean APIPlayerJoin(java.lang.String sender,
java.lang.String pid,
java.lang.String cid)
sender - String - player id of the senderpid - String - player id to be joinedcid - String - comms id to be used
public boolean APIPlayerJoin(java.lang.String sender,
java.lang.String pid,
java.lang.String cid,
boolean rflag)
sender - String - player id of the senderpid - String - player id to be joinedcid - String - comms id to be usedrflag - boolean - relay flag
public boolean onPlayerJoin(SPMessageClass messObj)
messObj - SPMessageClass - incoming Message Object
public boolean joinPlayer(java.lang.String pid,
java.lang.String cid,
boolean rflag)
pid - String - player id to be joinedcid - String - comms id to usedrflag - boolean - relay flag
public boolean APIrequestbeginGame(java.lang.String playerID)
playerID - String - id of player who is requesting
public boolean APIrequestendGame(java.lang.String playerID)
playerID - String - id of the player requesting
public boolean APIrequestcreateTransaction(java.lang.String pid,
java.lang.String transmaster,
java.lang.String transtype,
java.lang.String[] playerIDList,
boolean privateflagIN)
pid - String - player id of the player who is requesting (cannot be the master)transmaster - String - player id of the master.transtype - String - transaction type to be createdplayerIDList - String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.privateflagIN - boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
public boolean APIrequestPlayerJoin(java.lang.String sender,
java.lang.String pid,
java.lang.String cid,
boolean rflagIN)
sender - String - player id of the player who is requesting (can not be the master).pid - String - player id of the master.cid - String - comms id.rflagIN - boolean - relay flag
public boolean onrequestcreateTransaction(SPMessageClass incoming)
incoming - SPMessageClass - incoming message
public boolean onrequestPlayerJoin(SPMessageClass messObj)
messObj - SPMessageClass - incoming Message Object
public java.lang.String APIgetLicenseSummary()
public SPLogInterface APIgetGameLog()
public java.lang.Object APIgetGameLogCurrentEntry()
public int APIgetGameLogLength()
public java.lang.Object APIgetGameLogNextEntry()
public java.lang.Object APIgetGameLogPreviousEntry()
public java.lang.String[] APIgetOpenTransactionIDs()
public SPAbstractTransactionAPIInterface APIgetTransactionAPI(java.lang.String tid)
tid - String - the transaction id.
public boolean sendMessage(java.lang.String sender,
java.lang.String[] receivers,
boolean encryptflag,
boolean privateflag,
java.lang.String messagetype,
java.lang.String[] messagebody,
java.lang.String[] altmessage)
sender - - id of the senderreceivers - - ids of the recievers of the messageencryptflag - - encryption flagprivateflag - - private flagmessagetype - - the type of messagemessagebody - - the message bodyaltmessage - - alternative message
public SPAbstractTransactionInterface APIgetTransaction(java.lang.String tid)
tid - String - the transaction id
public boolean APIAddListener(SPEventInterface gameobj)
gameobj - SPEventInterface - the object to be added, that inplement the listener interface
SPRootTransactionClass.APIAddListener(SPEventInterface gameobj)public boolean APIRemoveListener(SPEventInterface gameobj)
gameobj - SPEventInterface - the object to be removed, that inplement the listener interface
SPRootTransactionClass.APIRemoveListener(SPEventInterface gameobj)public java.lang.Object[] APIGetListeners()
SPRootTransactionClass.APIGetListeners()public boolean APIClearListeners()
SPRootTransactionClass.APIClearListeners()public int APIGetListenerCount()
SPRootTransactionClass.APIGetListenerCount()public SPPlayerInterface APIgetPlayer(java.lang.String pid)
pid - String - the player ID
public java.lang.String[] APIgetPlayerIDList()
public boolean rulesbeginGame(java.lang.String requesterID)
requesterID - String - the id of the player who requested the request.
public boolean rulesendGame(java.lang.String requesterID)
requesterID - String - the id of the player who requested the request.
public boolean rulesPlayerJoin(java.lang.String sender,
java.lang.String[] messbody)
sender - String - the id of the player who requested the request.messbody - String[] - the message
public boolean rulescreateTransaction(java.lang.String sender,
java.lang.String transtype,
java.lang.String master,
java.lang.String[] players,
boolean pflag)
sender - String - the id of the player who requested the request.transtype - String - the transaction type to be createdmaster - String - the id of the master of the transaction.players - String[] - This is an array that holds the Player IDs of the players within the game that are participating in this transaction.pflag - boolean - This is a flag to describe whether the specific transaction is a private transaction to the non-participating Players.
public void onBlast(SPMessageClass messObj)
messObj - SPMessageClass - incoming Message Objectpublic void onnewGameBlock(SPMessageClass messObj)
messObj - SPMessageClass - incoming Message Objectpublic SPGameClass getGameinstance()
public boolean rulesnewplayerconfig(java.lang.String pid,
java.lang.String cid,
boolean rflag)
pid - String - player id of the player to be configuredcid - String - comms idrflag - boolean - relay flag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||