apps.mathpadapp.networkmanager.managers
Class NetworkedContentManager

java.lang.Object
  extended by apps.mathpadapp.networkmanager.managers.NetworkedContentManager
Direct Known Subclasses:
ClientManager, ControllerManager, ProjectorManager

public abstract class NetworkedContentManager
extends java.lang.Object

The Class NetworkedContentManager.


Nested Class Summary
static interface NetworkedContentManager.NetworkListener
          The listener interface for receiving network events.
 
Constructor Summary
NetworkedContentManager(ContentSystem contentSystem, TableCommsClientService comms, java.util.ArrayList<java.lang.Class<?>> receiverClasses)
          Instantiates a new networked content manager.
 
Method Summary
 void addNetworkListener(NetworkedContentManager.NetworkListener l)
          Adds the network listener.
 void allowedToSendmessage(boolean allowedToSendMessage)
          Allowed to sendmessage.
 ContentSystem getContentSystem()
          Gets the content system.
 java.util.List<TableIdentity> getOnlineTables()
          Gets the online tables.
 java.util.ArrayList<java.lang.Class<?>> getReceiverClasses()
          Gets the receiver classes.
 java.util.HashMap<UserIdentity,MathTool> getRegisteredMathPads()
          Gets the registered math pads.
 SyncManager getSyncManager()
          Gets the sync manager.
 UserIdentity getUserIdentityForMathTool(MathTool tool)
          Gets the user identity for math tool.
 boolean isAllowedToSendMessage()
          Checks if is allowed to send message.
 void registerMathPad(UserIdentity userId, MathTool tool)
          Register math pad.
 void removeNetworkListener(NetworkedContentManager.NetworkListener l)
          Removes the network listener.
 void removeNetworkListeners()
          Removes the network listeners.
 void sendMessage(java.lang.Object obj)
          Send message.
 void unregisterMathPad(UserIdentity userId)
          Unregister math pad.
 void update(float tpf)
          Update.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetworkedContentManager

public NetworkedContentManager(ContentSystem contentSystem,
                               TableCommsClientService comms,
                               java.util.ArrayList<java.lang.Class<?>> receiverClasses)
Instantiates a new networked content manager.

Parameters:
contentSystem - the content system
comms - the comms
receiverClasses - the receiver classes
Method Detail

addNetworkListener

public void addNetworkListener(NetworkedContentManager.NetworkListener l)
Adds the network listener.

Parameters:
l - the l

allowedToSendmessage

public void allowedToSendmessage(boolean allowedToSendMessage)
Allowed to sendmessage.

Parameters:
allowedToSendMessage - the allowed to send message

getContentSystem

public ContentSystem getContentSystem()
Gets the content system.

Returns:
the content system

getOnlineTables

public java.util.List<TableIdentity> getOnlineTables()
Gets the online tables.

Returns:
the online tables

getReceiverClasses

public java.util.ArrayList<java.lang.Class<?>> getReceiverClasses()
Gets the receiver classes.

Returns:
the receiver classes

getRegisteredMathPads

public java.util.HashMap<UserIdentity,MathTool> getRegisteredMathPads()
Gets the registered math pads.

Returns:
the registered math pads

getSyncManager

public SyncManager getSyncManager()
Gets the sync manager.

Returns:
the sync manager

getUserIdentityForMathTool

public UserIdentity getUserIdentityForMathTool(MathTool tool)
Gets the user identity for math tool.

Parameters:
tool - the tool
Returns:
the user identity for math tool

isAllowedToSendMessage

public boolean isAllowedToSendMessage()
Checks if is allowed to send message.

Returns:
true, if is allowed to send message

registerMathPad

public void registerMathPad(UserIdentity userId,
                            MathTool tool)
Register math pad.

Parameters:
userId - the user id
tool - the tool

removeNetworkListener

public void removeNetworkListener(NetworkedContentManager.NetworkListener l)
Removes the network listener.

Parameters:
l - the l

removeNetworkListeners

public void removeNetworkListeners()
Removes the network listeners.


sendMessage

public void sendMessage(java.lang.Object obj)
Send message.

Parameters:
obj - the obj

unregisterMathPad

public void unregisterMathPad(UserIdentity userId)
Unregister math pad.

Parameters:
userId - the user id

update

public void update(float tpf)
Update.

Parameters:
tpf - the tpf