|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectapps.remotecontrol.networkmanager.managers.NetworkedContentManager
public class NetworkedContentManager
The Class NetworkedContentManager.
Nested Class Summary | |
---|---|
static interface |
NetworkedContentManager.NetworkListener
The listener interface for receiving network events. |
Field Summary | |
---|---|
static short |
ITEM_ADDED
The item added. |
static short |
ITEM_DELETED
The item deleted. |
java.util.Map<java.lang.String,ContentItem> |
onlineItemsList
The online items list. |
Constructor Summary | |
---|---|
NetworkedContentManager(ContentSystem contentSystem,
TableCommsClientService comms,
java.util.List<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. |
void |
connectTable(TableIdentity remoteTableId)
Connect table. |
void |
disconnectTable(TableIdentity remoteTableId)
Disconnect table. |
void |
fireMessageReceived(java.lang.Object obj)
Fire message received. |
ContentSystem |
getContentSystem()
Gets the content system. |
java.util.Map<java.lang.String,ContentItem> |
getOnlineItems()
Gets the online items. |
java.util.List<TableIdentity> |
getOnlineTables()
Gets the online tables. |
java.util.List<TableIdentity> |
getProjectors()
Gets the projectors. |
java.util.List<java.lang.Class<?>> |
getReceiverClasses()
Gets the receiver classes. |
SyncManager |
getSyncManager()
Gets the sync manager. |
void |
handleConnectionRequest(TableIdentity targetTable,
boolean isConnect)
Handle connection request. |
boolean |
isAllowedToSendMessage()
Checks if is allowed to send message. |
void |
postAliveMessage(TableIdentity tableIdentity)
Post alive message. |
void |
postItemsToTable(java.util.HashMap<java.lang.String,Location> itemNames,
TableIdentity tableId,
TableIdentity targetTableId,
boolean deleteItems)
Post items to table. |
void |
processReceivedItems(PostItemsPortalMessage msg)
Process received items. |
void |
processTableMode(boolean locked)
Process table mode. |
void |
registerContentItems(java.util.HashMap<ContentItem,Location> contentItems)
Register content items. |
void |
registerContentItems(java.util.List<ContentItem> contentItems)
Register content items. |
void |
registerProjector(TableIdentity tableId)
Register projector. |
void |
removeNetworkListener(NetworkedContentManager.NetworkListener l)
Removes the network listener. |
void |
removeNetworkListeners()
Removes the network listeners. |
void |
sendMessage(java.lang.Object obj)
Send message. |
void |
setRemoteTableMode(TableIdentity tableId,
TablePortal.RemoteTableMode mode)
Sets the remote table mode. |
void |
syncContent(java.util.Map<java.lang.String,java.util.Map<java.lang.Short,java.lang.Object>> itemSyncDataMap)
Sync content. |
void |
transferContentItem(ContentItem item,
TableIdentity sourceTableId,
TableIdentity targetTableId,
Location newLoc)
Transfer content item. |
void |
unregisterContentItems(java.util.List<ContentItem> contentItems)
Unregister content items. |
void |
update(float tpf)
Update. |
void |
updateSyncData()
Update sync data. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static short ITEM_ADDED
public static short ITEM_DELETED
public java.util.Map<java.lang.String,ContentItem> onlineItemsList
Constructor Detail |
---|
public NetworkedContentManager(ContentSystem contentSystem, TableCommsClientService comms, java.util.List<java.lang.Class<?>> receiverClasses)
contentSystem
- the content systemcomms
- the commsreceiverClasses
- the receiver classesMethod Detail |
---|
public void addNetworkListener(NetworkedContentManager.NetworkListener l)
l
- the lpublic void allowedToSendmessage(boolean allowedToSendMessage)
allowedToSendMessage
- the allowed to send messagepublic void connectTable(TableIdentity remoteTableId)
remoteTableId
- the remote table idpublic void disconnectTable(TableIdentity remoteTableId)
remoteTableId
- the remote table idpublic void fireMessageReceived(java.lang.Object obj)
obj
- the objpublic ContentSystem getContentSystem()
public java.util.Map<java.lang.String,ContentItem> getOnlineItems()
public java.util.List<TableIdentity> getOnlineTables()
public java.util.List<TableIdentity> getProjectors()
public java.util.List<java.lang.Class<?>> getReceiverClasses()
public SyncManager getSyncManager()
public void handleConnectionRequest(TableIdentity targetTable, boolean isConnect)
targetTable
- the target tableisConnect
- the is connectpublic boolean isAllowedToSendMessage()
public void postAliveMessage(TableIdentity tableIdentity)
tableIdentity
- the table identitypublic void postItemsToTable(java.util.HashMap<java.lang.String,Location> itemNames, TableIdentity tableId, TableIdentity targetTableId, boolean deleteItems)
itemNames
- the item namestableId
- the table idtargetTableId
- the target table iddeleteItems
- the delete itemspublic void processReceivedItems(PostItemsPortalMessage msg)
msg
- the msgpublic void processTableMode(boolean locked)
locked
- the lockedpublic void registerContentItems(java.util.HashMap<ContentItem,Location> contentItems)
contentItems
- the content itemspublic void registerContentItems(java.util.List<ContentItem> contentItems)
contentItems
- the content itemspublic void registerProjector(TableIdentity tableId)
tableId
- the table idpublic void removeNetworkListener(NetworkedContentManager.NetworkListener l)
l
- the lpublic void removeNetworkListeners()
public void sendMessage(java.lang.Object obj)
obj
- the objpublic void setRemoteTableMode(TableIdentity tableId, TablePortal.RemoteTableMode mode)
tableId
- the table idmode
- the modepublic void syncContent(java.util.Map<java.lang.String,java.util.Map<java.lang.Short,java.lang.Object>> itemSyncDataMap)
itemSyncDataMap
- the item sync data mappublic void transferContentItem(ContentItem item, TableIdentity sourceTableId, TableIdentity targetTableId, Location newLoc)
item
- the itemsourceTableId
- the source table idtargetTableId
- the target table idnewLoc
- the new locpublic void unregisterContentItems(java.util.List<ContentItem> contentItems)
contentItems
- the content itemspublic void update(float tpf)
tpf
- the tpfpublic void updateSyncData()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |