|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.SecurePlay.SPRootTransactionClass
com.SecurePlay.SPAbstractTransactionClass
This is the common abstract transaction class for all transactions in the SecurePlay library
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
| Field Summary | |
protected SPAbstractTransactionAPIInterface |
classAPI
This is the api verion of this class |
protected java.lang.String[] |
configuration
This property holds the configuration of the Transaction Instance. |
protected java.lang.String |
gameblock
GameBlock or code associated with this transaction |
protected SPGameInterface |
gameinstance
This is the object handler for the Game Instance Object with which the transaction is associated. |
protected java.lang.String |
transactionstatus
This is a string that describes the current state of the transaction. |
protected java.lang.String |
transtype
Type of Transaction |
| Fields inherited from class com.SecurePlay.SPRootTransactionClass |
EventListenerList, gameID, master, playerIDList, transactionID |
| Constructor Summary | |
SPAbstractTransactionClass()
|
|
SPAbstractTransactionClass(SPGameInterface gameobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
Constructor. |
|
| Method Summary | |
boolean |
APIbeginTransaction(java.lang.String pid)
This action can only be initiated by the Transaction master. |
boolean |
APIcompleteTransaction(java.lang.String pid)
This method allows the Transaction Master ONLY to complete the transaction. |
boolean |
APIconfigureTransaction(java.lang.String pid,
java.lang.String[] args)
This method allows the Transaction Master ONLY to configure the transactions unique parameters. |
java.lang.String |
APIgetGameBlock()
Gets the gameblock of this transaction. |
boolean |
APIrequestbeginTransaction(java.lang.String pid)
This method allows any transaction participant excluding the Transaction master to request that the transaction be begun. |
boolean |
APIrequestCompleteTransaction(java.lang.String pid)
This method allows any player, excluding the Transaction master to request that the transactoin be completed. |
boolean |
APIrequestconfigureTransaction(java.lang.String pid,
java.lang.String[] args)
This method allows any player, excluding the Transaction master, to request that the transaction be configured as described in the configuration array. |
boolean |
APIsetGameBlock(java.lang.String pid,
java.lang.String newgameblock)
This method allows the Transaction Master ONLY to set the game block. |
java.lang.String |
APISPawn(java.lang.String pid)
This method creates a new transaction with the identical participants and configuration as the spawning transaction. |
protected SPAbstractTransactionInterface |
buildSPawn()
This method builds the spawned transaction object |
SPAbstractTransactionInterface |
createTransaction(SPGameAPIInterface gameapiobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
Creates a new instance of an Abstract Transaction class. |
SPAbstractTransactionAPIInterface |
getClassAPI()
Gets this class's API |
java.lang.String[] |
getConfiguration()
Getter function that returns the property: configuration |
SPGameInterface |
getGameinstance()
Getter function that returns the property: gameinstance |
java.lang.String |
getLasterror()
Getter function that returns the property: lasterror |
boolean |
getPrivacyFlag()
Gets the privacy flag of this class. |
java.lang.String |
getTransactionstatus()
Getter function that returns the property: transactionstatus |
java.lang.String |
getTransactionType()
This method returns a String of the transactiontype. |
static java.lang.String |
gettranstype()
This method gets the transaction type. |
boolean |
isPlayerInternal(java.lang.String pid)
Checks to see if the playr is internal |
boolean |
isPrivateflag()
Getter function that returns the property: privateflag |
void |
logError()
This is a shell method for future use. |
protected boolean |
onbeginTransaction(java.lang.String sourceID)
This method safely updates the state of the Transaction into the "ready" state, if possible. |
protected boolean |
onconfigureTransaction(SPMessageClass incoming)
This method safely configures a transaction. |
protected boolean |
onconfigureTransaction(java.lang.String sourceID,
java.lang.String[] configarr)
This method safely configures a transaction. |
boolean |
onincomingTransaction(SPMessageClass incoming)
This method handles the various incoming messages and passes them to the appropriate message type handler. |
void |
onrequestbeginTransaction(SPMessageClass incoming)
This method safely handles requests to begin the transaction. |
void |
onrequestcompleteTransaction(SPMessageClass incoming)
This method safely handles requests to complete a Transaction by a player that is not the Transaction master. |
protected void |
onrequestconfigureTransaction(SPMessageClass incoming)
This method safely handles a request from a player who is not the Transaction master to configure the transaction. |
protected boolean |
onSpawn(SPMessageClass incoming)
This method handles incoming spawn messages. |
protected boolean |
pronincomingTransaction(SPMessageClass incoming)
this is a shell for unique incoming transactions |
protected void |
pruniqueinit()
shell to allow unique initialization of transactions |
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 sends a message. |
protected boolean |
setGameBlock(java.lang.String sourceID,
java.lang.String newgameblock)
This method safely sets the game bock of a transaction. |
void |
setTransactionID(java.lang.String tid)
Sets the transaction id to a specified id. |
protected boolean |
spawnConfigure(SPAbstractTransactionInterface a)
This method configures the spawned transaction object |
boolean |
transComplete()
This method returns a flag for whether the transaction is currently in the "complete" state. |
boolean |
transError()
This method returns a flag for whether the status of the transaction is in error or not. |
| 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 |
| Field Detail |
protected SPGameInterface gameinstance
protected java.lang.String transactionstatus
protected java.lang.String[] configuration
protected SPAbstractTransactionAPIInterface classAPI
protected java.lang.String gameblock
protected java.lang.String transtype
| Constructor Detail |
public SPAbstractTransactionClass()
public SPAbstractTransactionClass(SPGameInterface gameobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
gameobj - SPGameInterface - game associated with this transaction.master - String - master of this transaction.playerIDList - String[] - player id list associated with this transaction.privateflag - boolean - privacy flag.transactionID - String - ID associated with this transaction.| Method Detail |
protected void pruniqueinit()
public boolean APIbeginTransaction(java.lang.String pid)
pid - String - id of the transaction beginner, must be the master and internal.
public boolean APIcompleteTransaction(java.lang.String pid)
pid - String - id of the player who is completing the transaction, must be the master and internal.
public boolean APIrequestCompleteTransaction(java.lang.String pid)
pid - String - id of the requestor, can not be the master, must be internal.
public boolean APIconfigureTransaction(java.lang.String pid,
java.lang.String[] args)
pid - String - id of the configurer, must be internal.args - String[] - the configuration array, with configuration details inside.
public boolean APIrequestconfigureTransaction(java.lang.String pid,
java.lang.String[] args)
pid - String - the configure requestor, can not be the master, must be internal.args - String[] - the configuration array, with configuration details.
public boolean APIrequestbeginTransaction(java.lang.String pid)
pid - String - the id of the requestor, can not be master, must be internal
protected boolean onconfigureTransaction(java.lang.String sourceID,
java.lang.String[] configarr)
sourceID - String - id of the source.configarr - String[] - configuration array
protected boolean onbeginTransaction(java.lang.String sourceID)
sourceID - String - source id
public boolean onincomingTransaction(SPMessageClass incoming)
SPAbstractTransactionInterface
onincomingTransaction in interface SPAbstractTransactionInterfaceincoming - SPMessageClass - incomng message
public boolean transComplete()
SPAbstractTransactionInterface
transComplete in interface SPAbstractTransactionInterfacepublic boolean transError()
protected boolean pronincomingTransaction(SPMessageClass incoming)
incoming - SPMessageClass - incoming message
public void onrequestcompleteTransaction(SPMessageClass incoming)
incoming - SPMessageClass - incomng messageprotected void onrequestconfigureTransaction(SPMessageClass incoming)
incoming - SPMessageClass - incomng messagepublic void onrequestbeginTransaction(SPMessageClass incoming)
incoming - SPMessageClass - incomng messagepublic boolean isPlayerInternal(java.lang.String pid)
pid - String - id of the player to be checked.
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)
SPAbstractTransactionInterface
sendMessage in interface SPAbstractTransactionInterfacesender - String - player id of the sender.receivers - String[] - player ids of recievers.encryptflag - boolean - enrypted flagprivateflag - boolean - private flagmessagetype - String - message typemessagebody - String[] - the message body as a stringaltmessage - String[] - alternative message.
public void logError()
public SPAbstractTransactionAPIInterface getClassAPI()
SPAbstractTransactionInterface
getClassAPI in interface SPAbstractTransactionInterfacepublic boolean getPrivacyFlag()
SPAbstractTransactionInterface
getPrivacyFlag in interface SPAbstractTransactionInterfacepublic void setTransactionID(java.lang.String tid)
SPAbstractTransactionInterface
setTransactionID in interface SPAbstractTransactionInterfacetid - String - the id of the transaction.public java.lang.String APISPawn(java.lang.String pid)
pid - String - player id must be master of the transaction
protected boolean onSpawn(SPMessageClass incoming)
incoming - SPMessageClass - spawn message
protected SPAbstractTransactionInterface buildSPawn()
protected boolean spawnConfigure(SPAbstractTransactionInterface a)
a - SPAbstractTransactionInterface - the transaction to be spawned
protected boolean onconfigureTransaction(SPMessageClass incoming)
incoming - SPMessageClass - incomng message
public boolean APIsetGameBlock(java.lang.String pid,
java.lang.String newgameblock)
pid - String - id of the player attempting to set the game block, must be internal.newgameblock - String - the game block for this transaction.
protected boolean setGameBlock(java.lang.String sourceID,
java.lang.String newgameblock)
sourceID - String - id of the source.newgameblock - String - candidate game block
public java.lang.String APIgetGameBlock()
SPAbstractTransactionInterface
APIgetGameBlock in interface SPAbstractTransactionInterfacepublic java.lang.String[] getConfiguration()
SPAbstractTransactionInterface
getConfiguration in interface SPAbstractTransactionInterfacepublic SPGameInterface getGameinstance()
public java.lang.String getLasterror()
public boolean isPrivateflag()
isPrivateflag in interface SPAbstractTransactionInterfacepublic java.lang.String getTransactionstatus()
SPAbstractTransactionInterface
getTransactionstatus in interface SPAbstractTransactionInterfacepublic java.lang.String getTransactionType()
SPAbstractTransactionInterface
getTransactionType in interface SPAbstractTransactionInterfacepublic static java.lang.String gettranstype()
public SPAbstractTransactionInterface createTransaction(SPGameAPIInterface gameapiobj,
java.lang.String master,
java.lang.String[] playerIDList,
boolean privateflag,
java.lang.String transactionID)
createTransaction in interface SPAbstractTransactionInterfacegameapiobj - SPGameInterface - game associated with this transaction.master - String - master of this transaction.playerIDList - String[] - player id list associated with this transaction.privateflag - boolean - privacy flag.transactionID - String - ID associated with this transaction.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||