com.SecurePlay
Interface SPAbstractTransactionInterface

All Known Implementing Classes:
SPAbstractTransactionClass

public interface SPAbstractTransactionInterface

The Abstract Transaction Interface is the required interface that all transactions that work with the SecurePlay library must support. This provides an alternate construction method for new transactions that does not require inheritance from the Abstract Transaction Class.

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Method Summary
 java.lang.String APIgetGameBlock()
          Gets the gameblock of this transaction.
 SPAbstractTransactionInterface createTransaction(SPGameAPIInterface gameapiobj, java.lang.String master, java.lang.String[] playerIDList, boolean privateflag, java.lang.String transactionID)
          This method creates a transaction.
 SPAbstractTransactionAPIInterface getClassAPI()
          Gets this class's API
 java.lang.String[] getConfiguration()
          Getter function that returns the property: configuration
 java.lang.String getGameID()
          Gets the game id associated with the transaction.
 java.lang.String getMaster()
          Gets the id of the master of the transaction.
 java.lang.String[] getPlayerIDList()
          Gets the player ids associated with the transaction.
 boolean getPrivacyFlag()
          Gets the privacy flag of this class.
 java.lang.String getTransactionID()
          Gets the transaction id.
 java.lang.String getTransactionstatus()
          Getter function that returns the property: transactionstatus
 java.lang.String getTransactionType()
          This method returns a String of the transactiontype.
 boolean isPrivateflag()
          Getter function that returns the property: privateflag
 boolean onincomingTransaction(SPMessageClass incoming)
          This method handles the various incoming messages and passes them to the appropriate message type handler.
 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.
 void setTransactionID(java.lang.String tid)
          Sets the transaction id to a specified id.
 boolean transComplete()
          This method returns a flag for whether the transaction is currently in the "complete" state.
 

Method Detail

onincomingTransaction

public boolean onincomingTransaction(SPMessageClass incoming)
This method handles the various incoming messages and passes them to the appropriate message type handler.

Parameters:
incoming - SPMessageClass - incomng message
Returns:
result - Boolean: TRUE if successful, FALSE, if unsuccessful

getMaster

public java.lang.String getMaster()
Gets the id of the master of the transaction.

Returns:
master - String - master of the transaction.

getTransactionID

public java.lang.String getTransactionID()
Gets the transaction id.

Returns:
tid - String - the transaction id

getClassAPI

public SPAbstractTransactionAPIInterface getClassAPI()
Gets this class's API

Returns:
classAPI - SPAbstractTransactionAPIClass

getGameID

public java.lang.String getGameID()
Gets the game id associated with the transaction.

Returns:
gid - String - game id

getPlayerIDList

public java.lang.String[] getPlayerIDList()
Gets the player ids associated with the transaction.

Returns:
players - String[] - players associated with the transaction in a String array.

getPrivacyFlag

public boolean getPrivacyFlag()
Gets the privacy flag of this class.

Returns:
privateflag - boolean

transComplete

public boolean transComplete()
This method returns a flag for whether the transaction is currently in the "complete" state.

Returns:
result - Boolean: TRUE, if transaction complete, FALSE, if not.

setTransactionID

public void setTransactionID(java.lang.String tid)
Sets the transaction id to a specified id.

Parameters:
tid - String - the id of the transaction.

sendMessage

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)
This method sends a message. It hands the configured message off to the appropriate comms service. Also, for private messages, it sends an alternate message to the parties not recieving the main message.

Parameters:
sender - String - player id of the sender.
receivers - String[] - player ids of recievers.
encryptflag - boolean - enrypted flag
privateflag - boolean - private flag
messagetype - String - message type
messagebody - String[] - the message body as a string
altmessage - String[] - alternative message.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

isPrivateflag

public boolean isPrivateflag()
Getter function that returns the property: privateflag

Returns:
privateflag - boolean

getTransactionstatus

public java.lang.String getTransactionstatus()
Getter function that returns the property: transactionstatus

Returns:
transactionstatus - String

getConfiguration

public java.lang.String[] getConfiguration()
Getter function that returns the property: configuration

Returns:
configuration - String[]

APIgetGameBlock

public java.lang.String APIgetGameBlock()
Gets the gameblock of this transaction.

Returns:
gameblock - String

getTransactionType

public java.lang.String getTransactionType()
This method returns a String of the transactiontype.

Returns:
this.transtype - String - name of transaction type

createTransaction

public SPAbstractTransactionInterface createTransaction(SPGameAPIInterface gameapiobj,
                                                        java.lang.String master,
                                                        java.lang.String[] playerIDList,
                                                        boolean privateflag,
                                                        java.lang.String transactionID)
This method creates a transaction. It is overriden in each individual transaction and it will return the individual transaction

Parameters:
gameapiobj -
master -
playerIDList -
privateflag -
transactionID -
Returns:
SPAbstractTransactionInterface