apps.mathpadapp.networkmanager.managers.syncmanager
Class SyncManager

java.lang.Object
  extended by apps.mathpadapp.networkmanager.managers.syncmanager.SyncManager

public class SyncManager
extends java.lang.Object

The Class SyncManager.


Constructor Summary
SyncManager(NetworkedContentManager networkManager)
          Instantiates a new sync manager.
 
Method Summary
 void addSyncListeners(UserIdentity userId)
          Adds the sync listeners.
 void enableBroadcastSync(boolean isBroadcastSynchronisationOn)
          Enable broadcast sync.
 void enableUnicastTableSync(TableIdentity syncWithTable, boolean isUnicastSynchronisationOn)
          Enable unicast table sync.
 void enableUnicastUserSync(TableIdentity syncWithTable, UserIdentity syncWithUser, boolean isUnicastSynchronisationOn)
          Enable unicast user sync.
 boolean isBroadcastSynchronisationOn()
          Checks if is broadcast synchronisation on.
 boolean isUnicastTableSynchronisationOn(TableIdentity syncWithTable)
          Checks if is unicast table synchronisation on.
 boolean isUnicastUserSynchronisationOn(UserIdentity syncWithUser)
          Checks if is unicast user synchronisation on.
 void registerPad(UserIdentity userId, MathPad pad)
          Register pad.
 void syncContent(TableIdentity sender, java.util.HashMap<UserIdentity,java.util.HashMap<java.lang.Short,java.lang.Object>> syncData)
          Sync content.
 void update(float tpf)
          Update.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncManager

public SyncManager(NetworkedContentManager networkManager)
Instantiates a new sync manager.

Parameters:
networkManager - the network manager
Method Detail

addSyncListeners

public void addSyncListeners(UserIdentity userId)
Adds the sync listeners.

Parameters:
userId - the user id

enableBroadcastSync

public void enableBroadcastSync(boolean isBroadcastSynchronisationOn)
Enable broadcast sync.

Parameters:
isBroadcastSynchronisationOn - the is broadcast synchronisation on

enableUnicastTableSync

public void enableUnicastTableSync(TableIdentity syncWithTable,
                                   boolean isUnicastSynchronisationOn)
Enable unicast table sync.

Parameters:
syncWithTable - the sync with table
isUnicastSynchronisationOn - the is unicast synchronisation on

enableUnicastUserSync

public void enableUnicastUserSync(TableIdentity syncWithTable,
                                  UserIdentity syncWithUser,
                                  boolean isUnicastSynchronisationOn)
Enable unicast user sync.

Parameters:
syncWithTable - the sync with table
syncWithUser - the sync with user
isUnicastSynchronisationOn - the is unicast synchronisation on

isBroadcastSynchronisationOn

public boolean isBroadcastSynchronisationOn()
Checks if is broadcast synchronisation on.

Returns:
true, if is broadcast synchronisation on

isUnicastTableSynchronisationOn

public boolean isUnicastTableSynchronisationOn(TableIdentity syncWithTable)
Checks if is unicast table synchronisation on.

Parameters:
syncWithTable - the sync with table
Returns:
true, if is unicast table synchronisation on

isUnicastUserSynchronisationOn

public boolean isUnicastUserSynchronisationOn(UserIdentity syncWithUser)
Checks if is unicast user synchronisation on.

Parameters:
syncWithUser - the sync with user
Returns:
true, if is unicast user synchronisation on

registerPad

public void registerPad(UserIdentity userId,
                        MathPad pad)
Register pad.

Parameters:
userId - the user id
pad - the pad

syncContent

public void syncContent(TableIdentity sender,
                        java.util.HashMap<UserIdentity,java.util.HashMap<java.lang.Short,java.lang.Object>> syncData)
Sync content.

Parameters:
sender - the sender
syncData - the sync data

update

public void update(float tpf)
Update.

Parameters:
tpf - the tpf