com.SecurePlay.Comms.SPCLocalCommsFileBinary
Class SPCLocalCommsFileBinaryClass

java.lang.Object
  extended bycom.SecurePlay.Comms.SPAbstractCommsClass
      extended bycom.SecurePlay.Comms.SPCLocalCommsFile.SPCLocalCommsFileClass
          extended bycom.SecurePlay.Comms.SPCLocalCommsFileBinary.SPCLocalCommsFileBinaryClass
All Implemented Interfaces:
java.lang.Runnable, SPAbstractCommsInterface

public class SPCLocalCommsFileBinaryClass
extends SPCLocalCommsFileClass

This class 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. This version uses files to exchange data rather than simply instances so that it can be used with different sessions or different languages, if message encodings are binary.

Author:
IT GlobalSecure
See Also:
SecurePlay License Information
 

Field Summary
 
Fields inherited from class com.SecurePlay.Comms.SPAbstractCommsClass
commstype
 
Constructor Summary
SPCLocalCommsFileBinaryClass()
          Default Constructor
 
Method Summary
protected  boolean prreceive(java.lang.String message)
          This standard method handles incoming serialized messages that have been separated out of incoming data streams by the incoming method.
protected  SPMessageClass[] SPdeserialize(java.lang.String message)
          This method takes a serialized messagestring and turns it into an instance of the SPMessageClass
protected  java.lang.String SPserialize(SPMessageClass message)
          This method takes an instance of the SPMessageClass and serializes it into a string.
 
Methods inherited from class com.SecurePlay.Comms.SPCLocalCommsFile.SPCLocalCommsFileClass
APIactivate, APIconfigureCommService, APIdeactivate, APIsetDirPath, getCommsServiceType, prsend, run
 
Methods inherited from class com.SecurePlay.Comms.SPAbstractCommsClass
addGame, addPlayer, APIconfigureCommService, getCommsID, getGameplayerList, getInternalGameIDList, getPrinternalGameList, isGameInternal, logError, processincoming, removeGame, removePlayer, sendMessage, sendMessage, setcommsID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPCLocalCommsFileBinaryClass

public SPCLocalCommsFileBinaryClass()
Default Constructor

Method Detail

prreceive

protected boolean prreceive(java.lang.String message)
Description copied from class: SPAbstractCommsClass
This standard method handles incoming serialized messages that have been separated out of incoming data streams by the incoming method. It parses them into Message Objects and passes them on to the Game Instance.

Overrides:
prreceive in class SPAbstractCommsClass
Parameters:
message - String - the incoming message
Returns:
result - Boolean: TRUE, if successfully handled, FALSE, if not.

SPdeserialize

protected SPMessageClass[] SPdeserialize(java.lang.String message)
Description copied from class: SPAbstractCommsClass
This method takes a serialized messagestring and turns it into an instance of the SPMessageClass

Overrides:
SPdeserialize in class SPAbstractCommsClass
Parameters:
message - String - serialized message object
Returns:
messobj - SPMessageClass - an instance of SPMessageClass

SPserialize

protected java.lang.String SPserialize(SPMessageClass message)
Description copied from class: SPAbstractCommsClass
This method takes an instance of the SPMessageClass and serializes it into a string.

Overrides:
SPserialize in class SPAbstractCommsClass
Parameters:
message - SPMessageClass - a message to be seriealized into a string
Returns:
mstring - String - the serialized string of the message