synergynetframework.appsystem.services.net.rapidnetworkmanager
Class RapidNetworkManager

java.lang.Object
  extended by synergynetframework.appsystem.services.net.rapidnetworkmanager.RapidNetworkManager

public class RapidNetworkManager
extends java.lang.Object

The Class RapidNetworkManager.


Nested Class Summary
static class RapidNetworkManager.SyncType
          The Enum SyncType.
 
Field Summary
static boolean isConnected
          The is connected.
 
Constructor Summary
RapidNetworkManager()
           
 
Method Summary
static void addNetworkedContentListener(NetworkedContentMessageProcessor.NetworkedContentListener listener)
          Adds the networked content listener.
static void broadcastItem(ContentItem item)
          Broadcast item.
static void broadcastItems(java.util.List<ContentItem> items)
          Broadcast items.
static void connect(DefaultSynergyNetApp app)
          Connect.
static void connect(DefaultSynergyNetApp app, boolean contentSystemExists)
          Connect.
static void enableNetworkFlick(boolean isFlickEnabled)
          Enable network flick.
static java.util.HashMap<java.lang.Class<? extends ContentItem>,ConstructionManager> getConstructionManagers()
          Gets the construction managers.
static java.util.List<java.lang.Class<?>> getReceiverClasses()
          Gets the receiver classes.
static TableCommsClientService getTableCommsClientService()
          Gets the table comms client service.
static void postItem(ContentItem item, TableIdentity tableIdentity)
          Post item.
static void postItems(java.util.List<ContentItem> items, TableIdentity tableIdentity)
          Post items.
static void registerConstructionManager(java.lang.Class<? extends ContentItem> itemClass, ConstructionManager constructManager)
          Register construction manager.
static void registerMessageProcessor(MessageProcessor processor)
          Register message processor.
static void removeMessageProcessor(MessageProcessor processor)
          Removes the message processor.
static void removeMessageProcessors()
          Removes the message processors.
static void removeNetworkedContentListeners()
          Removes the networked content listeners.
static void setAutoConnectTime(int reconnectTime)
          Sets the auto connect time.
static void setAutoReconnect(boolean autoReconnect)
          Sets the auto reconnect.
static void setTableOrientation(float angle)
          Sets the table orientation.
static void setTablePosition(int x, int y)
          Sets the table position.
static void shareItem(ContentItem item, TableIdentity tableIdentity, RapidNetworkManager.SyncType syncType)
          Share item.
static void unshareItem(ContentItem item, TableIdentity tableIdentity, RapidNetworkManager.SyncType syncType)
          Unshare item.
static void update()
          Update.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

isConnected

public static boolean isConnected
The is connected.

Constructor Detail

RapidNetworkManager

public RapidNetworkManager()
Method Detail

addNetworkedContentListener

public static void addNetworkedContentListener(NetworkedContentMessageProcessor.NetworkedContentListener listener)
Adds the networked content listener.

Parameters:
listener - the listener

broadcastItem

public static void broadcastItem(ContentItem item)
                          throws java.io.IOException
Broadcast item.

Parameters:
item - the item
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

broadcastItems

public static void broadcastItems(java.util.List<ContentItem> items)
                           throws java.io.IOException
Broadcast items.

Parameters:
items - the items
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

connect

public static void connect(DefaultSynergyNetApp app)
Connect.

Parameters:
app - the app

connect

public static void connect(DefaultSynergyNetApp app,
                           boolean contentSystemExists)
Connect.

Parameters:
app - the app
contentSystemExists - the content system exists

enableNetworkFlick

public static void enableNetworkFlick(boolean isFlickEnabled)
                               throws java.io.IOException
Enable network flick.

Parameters:
isFlickEnabled - the is flick enabled
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

getConstructionManagers

public static java.util.HashMap<java.lang.Class<? extends ContentItem>,ConstructionManager> getConstructionManagers()
Gets the construction managers.

Returns:
the construction managers

getReceiverClasses

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

Returns:
the receiver classes

getTableCommsClientService

public static TableCommsClientService getTableCommsClientService()
Gets the table comms client service.

Returns:
the table comms client service

postItem

public static void postItem(ContentItem item,
                            TableIdentity tableIdentity)
                     throws java.io.IOException
Post item.

Parameters:
item - the item
tableIdentity - the table identity
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

postItems

public static void postItems(java.util.List<ContentItem> items,
                             TableIdentity tableIdentity)
                      throws java.io.IOException
Post items.

Parameters:
items - the items
tableIdentity - the table identity
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

registerConstructionManager

public static void registerConstructionManager(java.lang.Class<? extends ContentItem> itemClass,
                                               ConstructionManager constructManager)
Register construction manager.

Parameters:
itemClass - the item class
constructManager - the construct manager

registerMessageProcessor

public static void registerMessageProcessor(MessageProcessor processor)
Register message processor.

Parameters:
processor - the processor

removeMessageProcessor

public static void removeMessageProcessor(MessageProcessor processor)
Removes the message processor.

Parameters:
processor - the processor

removeMessageProcessors

public static void removeMessageProcessors()
Removes the message processors.


removeNetworkedContentListeners

public static void removeNetworkedContentListeners()
Removes the networked content listeners.


setAutoConnectTime

public static void setAutoConnectTime(int reconnectTime)
Sets the auto connect time.

Parameters:
reconnectTime - the new auto connect time

setAutoReconnect

public static void setAutoReconnect(boolean autoReconnect)
Sets the auto reconnect.

Parameters:
autoReconnect - the new auto reconnect

setTableOrientation

public static void setTableOrientation(float angle)
Sets the table orientation.

Parameters:
angle - the new table orientation

setTablePosition

public static void setTablePosition(int x,
                                    int y)
Sets the table position.

Parameters:
x - the x
y - the y

shareItem

public static void shareItem(ContentItem item,
                             TableIdentity tableIdentity,
                             RapidNetworkManager.SyncType syncType)
                      throws java.io.IOException
Share item.

Parameters:
item - the item
tableIdentity - the table identity
syncType - the sync type
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

unshareItem

public static void unshareItem(ContentItem item,
                               TableIdentity tableIdentity,
                               RapidNetworkManager.SyncType syncType)
                        throws java.io.IOException
Unshare item.

Parameters:
item - the item
tableIdentity - the table identity
syncType - the sync type
Throws:
java.io.IOException - Signals that an I/O exception has occurred.

update

public static void update()
Update.