com.SecurePlay
Interface SPAbstractCommsInterface

All Known Implementing Classes:
SPAbstractCommsClass

public interface SPAbstractCommsInterface

This is the interface for all comms services classes.

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Method Summary
 boolean addGame(java.lang.String gid, SPCommsManagerCommsInterface gamcomobj)
          This method adds an internal game to a specific comms service.
 boolean addPlayer(java.lang.String pid, java.lang.String gid)
          This method adds a player ID of a remote player serviced by this comm service.
 java.lang.String getCommsID()
          Gets the comms id.
 java.lang.String getCommsServiceType()
          This method returns a unique identifier for the type of comms service instance.
 SPMap getGameplayerList()
          Getter function that returns the property: gameplayerList
 java.lang.String[] getInternalGameIDList()
          Getter function that returns the property: internalGameIDList
 SPMap getPrinternalGameList()
          Getter function that returns the property: printernalGameList
 boolean isGameInternal(java.lang.String gid)
          This method returns whether a game is handled internally by a comms service
 boolean removeGame(java.lang.String gid)
          This method removes the association of a game with the comms service.
 boolean removePlayer(java.lang.String pid, java.lang.String gid)
          This method removes a player from the list of remote players served by this comm service.
 int sendMessage(SPMessageClass clearmessage, SPMessageClass alternatemessage)
          This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList (This method takes the message and sends it over the network, if they are served by this comms service.)
 int sendMessage(java.lang.String[] receivers, SPMessageClass clearmessage, SPMessageClass alternatemessage)
          This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList This method is depreceated and will be removed in a future version of the software (This method takes the message and sends it over the network, if they are served by this comms service.)
 boolean setcommsID(java.lang.String cid)
          This method sets the internal ID for a comms service if it has not been set.
 

Method Detail

setcommsID

public boolean setcommsID(java.lang.String cid)
This method sets the internal ID for a comms service if it has not been set. NOTE, this ID is not the public, network, or other ID for the communications service, but simply an internal handler.

Parameters:
cid - String - comms id
Returns:
boolean: TRUE, if succesful, FALSE, if not

getCommsServiceType

public java.lang.String getCommsServiceType()
This method returns a unique identifier for the type of comms service instance.

Returns:
String - unique identifier for type of comms service

addGame

public boolean addGame(java.lang.String gid,
                       SPCommsManagerCommsInterface gamcomobj)
This method adds an internal game to a specific comms service. The connection is to the SPComms class associated with the game to allow incoming messages to be serviced.

Parameters:
gid - String - game id
gamcomobj - SPCommsManagerCommsInterface - the comms object to be added to a game
Returns:
boolean - TRUE, if successful, FALSE, if not

removeGame

public boolean removeGame(java.lang.String gid)
This method removes the association of a game with the comms service. NOTE: actually the association that is removed is with the game instance's SPComms class instance.

Parameters:
gid - String - game id
Returns:
boolean - TRUE, if successful, FALSE, if not

addPlayer

public boolean addPlayer(java.lang.String pid,
                         java.lang.String gid)
This method adds a player ID of a remote player serviced by this comm service.

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

removePlayer

public boolean removePlayer(java.lang.String pid,
                            java.lang.String gid)
This method removes a player from the list of remote players served by this comm service.

Parameters:
pid - String - player id to ber removed.
gid - String - game id from which the player is to be removed.
Returns:
result - Boolean: TRUE, if successful, FALSE, if not

sendMessage

public int sendMessage(SPMessageClass clearmessage,
                       SPMessageClass alternatemessage)
This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList (This method takes the message and sends it over the network, if they are served by this comms service.)

Parameters:
clearmessage - SPMessageClass - message for receivers
alternatemessage - SPMessageClass - message or other game players
Returns:
integer - int - Number of remote players that were handled by this comm service for the message (or the number of players supported by the Comms Service in the input playerID array.)

sendMessage

public int sendMessage(java.lang.String[] receivers,
                       SPMessageClass clearmessage,
                       SPMessageClass alternatemessage)
This method returns a number based on the input array to indicate how many of the input array's player IDs are included in the comms service playerIDList This method is depreceated and will be removed in a future version of the software (This method takes the message and sends it over the network, if they are served by this comms service.)

Parameters:
receivers - String[] - array of playerIDs
clearmessage - SPMessageClass - message for receivers
alternatemessage - SPMessageClass - message or other game players
Returns:
integer - int - Number of remote players that were handled by this comm service for the message (or the number of players supported by the Comms Service in the input playerID array.)

getCommsID

public java.lang.String getCommsID()
Gets the comms id.

Returns:
commsid - String - comms id.

isGameInternal

public boolean isGameInternal(java.lang.String gid)
This method returns whether a game is handled internally by a comms service

Parameters:
gid - - String
Returns:
boolean - True if game is internal and supported by Comms Service

getGameplayerList

public SPMap getGameplayerList()
Getter function that returns the property: gameplayerList

Returns:
gameplayerList - SPMap

getInternalGameIDList

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

Returns:
internalGameIDList - String[]

getPrinternalGameList

public SPMap getPrinternalGameList()
Getter function that returns the property: printernalGameList

Returns:
printernalGameList - SPMap