com.SecurePlay.Comms.SPCLocalComms
Class SPCLocalCommsClass

java.lang.Object
  extended bycom.SecurePlay.Comms.SPAbstractCommsClass
      extended bycom.SecurePlay.Comms.SPCLocalComms.SPCLocalCommsClass
All Implemented Interfaces:
java.lang.Runnable, SPAbstractCommsInterface

public class SPCLocalCommsClass
extends SPAbstractCommsClass
implements java.lang.Runnable

This method handles communications between multiple instances of the SecurePlay library on a single computer. This is an easy way to test or implement multiplayer games with a single design. Each SecurePlay library instance should have its own SPLocalCommsClass object instance

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
 java.lang.String commstype
          Type of Comms Service
 
Constructor Summary
SPCLocalCommsClass()
          Default Constructor
 
Method Summary
 boolean APIactivate()
          This method adds the Local Comms instance to the set of active Local Comms objects so it will receive incoming messages
 boolean APIdeactivate()
          This method removes the Local Comms instance from the set of active local Comms objects so it can no longer send or receive messages
 boolean prsend(java.lang.String message)
          This method sends messages to each of the registered Local Comms instances
 void run()
           
 
Methods inherited from class com.SecurePlay.Comms.SPAbstractCommsClass
addGame, addPlayer, APIconfigureCommService, getCommsID, getCommsServiceType, getGameplayerList, getInternalGameIDList, getPrinternalGameList, isGameInternal, logError, processincoming, prreceive, removeGame, removePlayer, sendMessage, sendMessage, setcommsID, SPdeserialize, SPserialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commstype

public final java.lang.String commstype
Type of Comms Service

See Also:
Constant Field Values
Constructor Detail

SPCLocalCommsClass

public SPCLocalCommsClass()
Default Constructor

Method Detail

prsend

public boolean prsend(java.lang.String message)
This method sends messages to each of the registered Local Comms instances

Overrides:
prsend in class SPAbstractCommsClass
Parameters:
message -
Returns:
boolean - true, if successful

APIactivate

public boolean APIactivate()
This method adds the Local Comms instance to the set of active Local Comms objects so it will receive incoming messages

Overrides:
APIactivate in class SPAbstractCommsClass
Returns:
true - Boolean: TRUE, if successful, FALSE, if not.

APIdeactivate

public boolean APIdeactivate()
This method removes the Local Comms instance from the set of active local Comms objects so it can no longer send or receive messages

Overrides:
APIdeactivate in class SPAbstractCommsClass
Returns:
true - Boolean: TRUE, if successful, FALSE, if not.

run

public void run()
Specified by:
run in interface java.lang.Runnable