public class RemoteEntityData
extends java.lang.Object
implements com.simsilica.es.EntityData
Note: EntitySets returned by this implementation will behave slightly different than from their local counterparts. It is still 100% within the contract of EnitySet and properly written code won't have an issue. In a local-access situation, retrieving the EntitySet will also populate it. In this implementation, the data arrives asynchronously as if entities have been added during applyChanges().
| Modifier and Type | Class and Description |
|---|---|
protected class |
RemoteEntityData.PendingEntityIdsRequest |
protected class |
RemoteEntityData.PendingEntityRequest |
protected class |
RemoteEntityData.PendingRequest<M,T> |
protected class |
RemoteEntityData.PendingStringRequest |
protected class |
RemoteEntityData.PendingWatchEntityRequest |
| Constructor and Description |
|---|
RemoteEntityData(com.jme3.network.Client client,
int channel)
Creates a new RemoteEntityData instance that will communicate
over the specified client and channel to provide remote
EntityData access.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
com.simsilica.es.EntityId |
createEntity() |
protected void |
entityChange(com.simsilica.es.EntityChange change) |
java.util.Set<com.simsilica.es.EntityId> |
findEntities(com.simsilica.es.ComponentFilter filter,
java.lang.Class... types) |
com.simsilica.es.EntityId |
findEntity(com.simsilica.es.ComponentFilter filter,
java.lang.Class... types) |
<T extends com.simsilica.es.EntityComponent> |
getComponent(com.simsilica.es.EntityId entityId,
java.lang.Class<T> type) |
com.simsilica.es.EntitySet |
getEntities(java.lang.Class... types) |
com.simsilica.es.EntitySet |
getEntities(com.simsilica.es.ComponentFilter filter,
java.lang.Class... types) |
com.simsilica.es.Entity |
getEntity(com.simsilica.es.EntityId entityId,
java.lang.Class... types) |
protected java.lang.String |
getString(int id) |
protected java.lang.Integer |
getStringId(java.lang.String s) |
protected StringIdMessage |
getStringResponse(StringIdMessage msg) |
com.simsilica.es.StringIndex |
getStrings() |
boolean |
removeComponent(com.simsilica.es.EntityId entityId,
java.lang.Class type) |
void |
removeEntity(com.simsilica.es.EntityId entityId) |
void |
setComponent(com.simsilica.es.EntityId entityId,
com.simsilica.es.EntityComponent component) |
void |
setComponents(com.simsilica.es.EntityId entityId,
com.simsilica.es.EntityComponent... components) |
com.simsilica.es.WatchedEntity |
watchEntity(com.simsilica.es.EntityId entityId,
java.lang.Class... types) |
public RemoteEntityData(com.jme3.network.Client client,
int channel)
public <T extends com.simsilica.es.EntityComponent> T getComponent(com.simsilica.es.EntityId entityId,
java.lang.Class<T> type)
getComponent in interface com.simsilica.es.EntityDatapublic com.simsilica.es.Entity getEntity(com.simsilica.es.EntityId entityId,
java.lang.Class... types)
getEntity in interface com.simsilica.es.EntityDatapublic com.simsilica.es.EntityId findEntity(com.simsilica.es.ComponentFilter filter,
java.lang.Class... types)
findEntity in interface com.simsilica.es.EntityDatapublic java.util.Set<com.simsilica.es.EntityId> findEntities(com.simsilica.es.ComponentFilter filter,
java.lang.Class... types)
findEntities in interface com.simsilica.es.EntityDatapublic com.simsilica.es.EntitySet getEntities(java.lang.Class... types)
getEntities in interface com.simsilica.es.EntityDatapublic com.simsilica.es.EntitySet getEntities(com.simsilica.es.ComponentFilter filter,
java.lang.Class... types)
getEntities in interface com.simsilica.es.EntityDatapublic com.simsilica.es.WatchedEntity watchEntity(com.simsilica.es.EntityId entityId,
java.lang.Class... types)
watchEntity in interface com.simsilica.es.EntityDatapublic void close()
close in interface com.simsilica.es.EntityDataprotected StringIdMessage getStringResponse(StringIdMessage msg)
protected java.lang.Integer getStringId(java.lang.String s)
protected java.lang.String getString(int id)
public com.simsilica.es.StringIndex getStrings()
getStrings in interface com.simsilica.es.EntityDatapublic com.simsilica.es.EntityId createEntity()
createEntity in interface com.simsilica.es.EntityDatapublic void removeEntity(com.simsilica.es.EntityId entityId)
removeEntity in interface com.simsilica.es.EntityDatapublic void setComponent(com.simsilica.es.EntityId entityId,
com.simsilica.es.EntityComponent component)
setComponent in interface com.simsilica.es.EntityDatapublic void setComponents(com.simsilica.es.EntityId entityId,
com.simsilica.es.EntityComponent... components)
setComponents in interface com.simsilica.es.EntityDatapublic boolean removeComponent(com.simsilica.es.EntityId entityId,
java.lang.Class type)
removeComponent in interface com.simsilica.es.EntityDataprotected void entityChange(com.simsilica.es.EntityChange change)