SecurePlayLibray J2SE
v2.1

com.SecurePlay
Class SecurePlayClass

java.lang.Object
  extended bycom.SecurePlay.SecurePlayClass

public class SecurePlayClass
extends java.lang.Object

This is the main Secure Play Library Class.

Version:
3.1
Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
private  java.lang.String company
          This is the company name of the authorized SecurePlay licensee.
private  java.lang.String email
          This is the point of contact email for the SecurePlay product licensee.
private  boolean initialized
          Flag that determines if the class has been initialized.
private  java.util.Vector LibraryListeners
          This holds a list of global listeners that recieve every notify from every game and every transaction in this SecurePlayClass instance.
private  java.lang.String pocname
          This is the individual who is the contact for the SecurePlay license for use of the library.
private  SPMap prcommsServicesList
          The commsServicesList holds a list of pointers to the various comms services objects (such as Flash Remoting, http, socket connection, SMS, etc.).
private  SPMap prgamesList
          This class holds pointers to the various active game instances.
private  java.lang.String[] prplayersList
          This private list holds the list player ids
(package private)  java.lang.String releaseversion
          IT GlobalSecure release version.
private  java.lang.String siteURL
          This is the URL of the Site that holds the SecurePlay license.
private  java.lang.String SPLicenseKey
          This is the license key for the registered SecurePlay user.
private  java.lang.String SPSerialNumber
          This is the serial number of the SecurePlay licensee.
 
Constructor Summary
SecurePlayClass()
          Default Constructor.
 
Method Summary
 boolean APIaddGameComms(java.lang.String gid, java.lang.String commsID)
          This method associates a communications service with a game instance.
 boolean APIaddGamePlayer(java.lang.String gid, java.lang.String pid)
          This method associates a Player instance with a Game Instance so the player can participate in the game.
 boolean APIaddLibraryListeners(SPEventInterface Glistener)
          This method adds a global listener to this SecurePlayClass.
 void APIclearCommsServices()
          This clears all of the comms services associated with the SecurePlay library.
 void APIclearGames()
          This removes all of the Game Instances associated with the SecurePlay library.
 boolean APIclearLibraryListeners()
          This method removes all the global listeners from this SecurePlayClass.
 void APIclearPlayers()
          This method removes all of the Player Instances associated with the SecurePlay library.
 boolean APIcreateComms(java.lang.String commsID, SPAbstractCommsInterface commsObj)
          This method creates a comms service.
 boolean APIcreateGame(SPGameInterface game, java.lang.String gameID)
          Attach an existing Game Instance to the Library.
 boolean APIcreatePlayer(java.lang.String playerID)
          Adds a player instance.
 SPAbstractCommsInterface APIgetCommsService(java.lang.String commsID)
          This method uses a commsID and returns the appropriate Communications Service Instance.
 SPGameInterface APIgetGame(java.lang.String gameID)
          This method takes a gameID and returns the associated Game Instance object.
 java.util.Vector APIgetLibraryListeners()
          Gets all the listeners that are listening for any notify in this library.
 java.lang.String APIgetLicenseSummary()
          This method returns the summary of the license.
 java.lang.String[] APIgetOpenCommServiceIDs()
          This method return
 java.lang.String[] APIgetOpenGameIDs()
          Gets the keys of an associative array(SPHashtable) this.prgamesList and returns them as a String array of open games id list.
 java.lang.String[] APIgetOpenPlayerIDs()
          Returns a list of player IDs open.
 boolean APIremoveCommsService(java.lang.String commsID)
          This method removes a Comms Service Instance specified by a commsID from the active SecurePlay library.
 boolean APIremoveGame(java.lang.String gameID)
          This method takes a gameID and removes the Game Instance from the active SecurePlay library.
 boolean APIremoveLibraryListeners(SPEventInterface Glistener)
          This method removes a global listener object from this SecurePlayClass.
 boolean APIremovePlayer(java.lang.String playerID)
          This method removes an instance of a Player from the active SecurePlay library.
 boolean APIsetLicenseInfo(java.lang.String pocname, java.lang.String company, java.lang.String siteURL, java.lang.String email, java.lang.String SPSerialNumber, java.lang.String SPLicenseKey)
          Loads registered SecurePlay licensee information.
 boolean APIsetPlayerGameComms(java.lang.String gid, java.lang.String playerID, java.lang.String commsID)
          This method associates a specific comms service with a specific player and a specific game.
protected  boolean checkLicense()
          This method is used to verify that the SecurePlay license information is provided completely and properly.
private  java.lang.String getCompany()
          Getter function that returns the property: company
private  java.lang.String getEmail()
          Getter function that returns the property: email
private  java.lang.String getPocname()
          Getter function that returns the property: pocname
protected  SPMap getPrcommsServicesList()
          Getter function that returns the property: prcommsServicesList
protected  SPMap getPrgamesList()
          Getter function that returns the property: prgamesList
protected  java.lang.String[] getPrplayersList()
          Getter function that returns the property: prplayersList
private  java.lang.String getSiteURL()
          Getter function that returns the property: siteURL
private  java.lang.String getSPLicenseKey()
          Getter function that returns the property: SPLicenseKey
private  java.lang.String getSPSerialNumber()
          Returns the serial number.
private  boolean isCommsIncluded(java.lang.String cid)
          This method checks to see if the comms object exists in the comms list of this library.
private  boolean isGameIncluded(java.lang.String gid)
          This method checks to see if the game exists in the game list of this library.
protected  boolean isInitialized()
          Getter function that returns the property: initialized
protected  boolean isPlayerIncluded(java.lang.String pid)
          This method returns a boolean TRUE if there is a player object specified by the indicated Player ID is included in the Library instance.
static java.lang.String releaseversion()
          This method returns the current release verion of this library.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

pocname

private java.lang.String pocname
This is the individual who is the contact for the SecurePlay license for use of the library.


company

private java.lang.String company
This is the company name of the authorized SecurePlay licensee.


siteURL

private java.lang.String siteURL
This is the URL of the Site that holds the SecurePlay license.


email

private java.lang.String email
This is the point of contact email for the SecurePlay product licensee.


SPSerialNumber

private java.lang.String SPSerialNumber
This is the serial number of the SecurePlay licensee. Removal is a violation of the SecurePlay license.


SPLicenseKey

private java.lang.String SPLicenseKey
This is the license key for the registered SecurePlay user. Removal of this key or any other license information is a violation of the SecurePlay license.


prgamesList

private SPMap prgamesList
This class holds pointers to the various active game instances.


prplayersList

private java.lang.String[] prplayersList
This private list holds the list player ids


prcommsServicesList

private SPMap prcommsServicesList
The commsServicesList holds a list of pointers to the various comms services objects (such as Flash Remoting, http, socket connection, SMS, etc.).


initialized

private boolean initialized
Flag that determines if the class has been initialized.


releaseversion

final java.lang.String releaseversion
IT GlobalSecure release version.


LibraryListeners

private java.util.Vector LibraryListeners
This holds a list of global listeners that recieve every notify from every game and every transaction in this SecurePlayClass instance.

Constructor Detail

SecurePlayClass

public SecurePlayClass()
Default Constructor. This constructor sets all the lisence related parameters to its default. And it sets the default for Log, SecurityManager, and it also registers Blast Transaction as default transaction for this library.

Method Detail

APIsetLicenseInfo

public boolean APIsetLicenseInfo(java.lang.String pocname,
                                 java.lang.String company,
                                 java.lang.String siteURL,
                                 java.lang.String email,
                                 java.lang.String SPSerialNumber,
                                 java.lang.String SPLicenseKey)
Loads registered SecurePlay licensee information. Removal, modification, or disablement of this method or any other licensing code is a violation of the SecurePlay library license agreement. This method is used for Commercial Licenses. Simple Open Source licensees use the APIsetSOSLicenseInfo method.

Parameters:
pocname - String - individual who represents the company
company - String - company name.
siteURL - String - company web site.
email - String - company email.
SPSerialNumber - String - serial number of the SecurePlay licensee
SPLicenseKey - String - license key for the registered SecurePlay user.
Returns:
boolean - TRUE, if successful, FALSE, if not

APIcreatePlayer

public boolean APIcreatePlayer(java.lang.String playerID)
Adds a player instance.

Parameters:
playerID - String - player id of the player to be created
Returns:
boolean - TRUE, if successful, FALSE, if not

APIcreateComms

public boolean APIcreateComms(java.lang.String commsID,
                              SPAbstractCommsInterface commsObj)
This method creates a comms service.

Parameters:
commsID - String - id of the comms to be created
commsObj - SPAbstractCommsInterface - comms object to be added
Returns:
boolean - TRUE, if succcessful, FALSE, if not.

APIsetPlayerGameComms

public boolean APIsetPlayerGameComms(java.lang.String gid,
                                     java.lang.String playerID,
                                     java.lang.String commsID)
This method associates a specific comms service with a specific player and a specific game.

Parameters:
gid - String - game id to which the players and comms will be set
playerID - String - id of the player to be set
commsID - String - id of th comms to be set
Returns:
boolean - TRUE, if successful, FALSE, if not

APIaddGamePlayer

public boolean APIaddGamePlayer(java.lang.String gid,
                                java.lang.String pid)
This method associates a Player instance with a Game Instance so the player can participate in the game.

Parameters:
gid - String - id of the game to which the player will be added
pid - String - id of the player to be added
Returns:
boolean - TRUE, if successful, FALSE, if not successful

APIaddGameComms

public boolean APIaddGameComms(java.lang.String gid,
                               java.lang.String commsID)
This method associates a communications service with a game instance.

Parameters:
gid - String - id of the game to which the comms will be added
commsID - String - id of the comms to be added
Returns:
boolean - TRUE if successful, FALSE, if unsuccessful

APIgetGame

public SPGameInterface APIgetGame(java.lang.String gameID)
This method takes a gameID and returns the associated Game Instance object.

Parameters:
gameID - String - id of the game to be retrieved
Returns:
SPGameInterface - returns the actual object

APIgetCommsService

public SPAbstractCommsInterface APIgetCommsService(java.lang.String commsID)
This method uses a commsID and returns the appropriate Communications Service Instance.

Parameters:
commsID - String - id of the comms to be retrieved
Returns:
SPAbstractCommsInterface - returns the actual object

APIremoveGame

public boolean APIremoveGame(java.lang.String gameID)
This method takes a gameID and removes the Game Instance from the active SecurePlay library.

Parameters:
gameID - String - id of the game to be removed
Returns:
boolean - TRUE, if successful, FALSE, if not

APIremovePlayer

public boolean APIremovePlayer(java.lang.String playerID)
This method removes an instance of a Player from the active SecurePlay library.

Parameters:
playerID - String - id of the player to be removed
Returns:
boolean - TRUE, if successful, FALSE, if not

APIremoveCommsService

public boolean APIremoveCommsService(java.lang.String commsID)
This method removes a Comms Service Instance specified by a commsID from the active SecurePlay library.

Parameters:
commsID - String - id of the comms to be removed
Returns:
boolean - TRUE, if successful, FALSE, if not.

APIclearGames

public void APIclearGames()
This removes all of the Game Instances associated with the SecurePlay library. Use with caution.

Returns:
void

APIclearPlayers

public void APIclearPlayers()
This method removes all of the Player Instances associated with the SecurePlay library.

Returns:
void

APIclearCommsServices

public void APIclearCommsServices()
This clears all of the comms services associated with the SecurePlay library. It should be used with great caution.

Returns:
void

checkLicense

protected boolean checkLicense()
This method is used to verify that the SecurePlay license information is provided completely and properly.

Returns:
boolean - TRUE, if license information is set properly. FALSE, if not

APIgetOpenCommServiceIDs

public java.lang.String[] APIgetOpenCommServiceIDs()
This method return

Returns:
String[] - array of open comms services id list

APIgetOpenGameIDs

public java.lang.String[] APIgetOpenGameIDs()
Gets the keys of an associative array(SPHashtable) this.prgamesList and returns them as a String array of open games id list.

Returns:
String[] - array of open games id list

APIgetOpenPlayerIDs

public java.lang.String[] APIgetOpenPlayerIDs()
Returns a list of player IDs open.

Returns:
String[] - array of open players id list

isPlayerIncluded

protected boolean isPlayerIncluded(java.lang.String pid)
This method returns a boolean TRUE if there is a player object specified by the indicated Player ID is included in the Library instance.

Parameters:
pid - String - the player id to be checked
Returns:
boolean - TRUE, if successful, FALSE, if not successful

isGameIncluded

private boolean isGameIncluded(java.lang.String gid)
This method checks to see if the game exists in the game list of this library.

Parameters:
gid - String - the game id to be checked
Returns:
boolean - TRUE, if successful, FALSE, if not successful

isCommsIncluded

private boolean isCommsIncluded(java.lang.String cid)
This method checks to see if the comms object exists in the comms list of this library.

Parameters:
cid - String - the comms id to be checked
Returns:
boolean - TRUE, if successful, FALSE, if not successful

APIcreateGame

public boolean APIcreateGame(SPGameInterface game,
                             java.lang.String gameID)
Attach an existing Game Instance to the Library.

Parameters:
game - SPGameInterface - the game object to be attached
gameID - String - game id of the new game.
Returns:
boolean - TRUE, if the game was created successfully, FALSE, otherwise

getCompany

private java.lang.String getCompany()
Getter function that returns the property: company

Returns:
String - company

getEmail

private java.lang.String getEmail()
Getter function that returns the property: email

Returns:
String - email

isInitialized

protected boolean isInitialized()
Getter function that returns the property: initialized

Returns:
boolean - initialized?

getPocname

private java.lang.String getPocname()
Getter function that returns the property: pocname

Returns:
String - the individual who is the contact for the SecurePlay license for use of the library.

getPrcommsServicesList

protected SPMap getPrcommsServicesList()
Getter function that returns the property: prcommsServicesList

Returns:
SPMap - prcommsServicesList

getPrgamesList

protected SPMap getPrgamesList()
Getter function that returns the property: prgamesList

Returns:
SPMap - prgamesList

getPrplayersList

protected java.lang.String[] getPrplayersList()
Getter function that returns the property: prplayersList

Returns:
String[] - prgamesList

getSiteURL

private java.lang.String getSiteURL()
Getter function that returns the property: siteURL

Returns:
String - site URL.

getSPLicenseKey

private java.lang.String getSPLicenseKey()
Getter function that returns the property: SPLicenseKey

Returns:
String - license key.

getSPSerialNumber

private java.lang.String getSPSerialNumber()
Returns the serial number.

Returns:
String - serial number

APIgetLicenseSummary

public java.lang.String APIgetLicenseSummary()
This method returns the summary of the license.

Returns:
String - the summary of the license

APIaddLibraryListeners

public boolean APIaddLibraryListeners(SPEventInterface Glistener)
This method adds a global listener to this SecurePlayClass.

Parameters:
Glistener - SPEventInterface - the global listener.
Returns:
boolean

APIremoveLibraryListeners

public boolean APIremoveLibraryListeners(SPEventInterface Glistener)
This method removes a global listener object from this SecurePlayClass.

Parameters:
Glistener - SPEventInterface - the global listener.
Returns:
boolean

APIclearLibraryListeners

public boolean APIclearLibraryListeners()
This method removes all the global listeners from this SecurePlayClass.

Returns:
boolean

APIgetLibraryListeners

public java.util.Vector APIgetLibraryListeners()
Gets all the listeners that are listening for any notify in this library.

Returns:
Vector

releaseversion

public static java.lang.String releaseversion()
This method returns the current release verion of this library.

Returns:
String

SecurePlayLibray J2SE
v2.1

2006 Copyright Filed by IT GlobalSecure, Inc. All Rights Reserved. Not to be used without authorization by Author. SecurePlay, IT GlobalSecure, and IT Armor are registered trademarks by IT GlobalSecure, Inc. Software protected by software license, and one or more the following U.S. and International patent numbers: U.S. Patent 6,030,288, U.S. Patent 6,165,072, European Patent Office EP1016049A1,and World Intellectual Property Organization WO9912135C1 and additional filings worldwide.