|
|||||||||
Atavism Version 2018.1 | AGIS API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatavism.msgsys.Message
atavism.server.messages.PerceptionMessage
public class PerceptionMessage
Changes to the objects perceived by a target object. The PerceptionMessage contains a list of gained objects and a list of lost objects. Gained objects are newly perceived and lost objects are no longer perceivable.
Gained and lost objects are each described by an PerceptionMessage.ObjectNote
.
The ObjectNote contains the object OID (subject) and object type.
The ObjectNote may optionally contain some
arbitrary object information (see PerceptionMessage.ObjectNote.getObjectInfo()
).
ObjectNote supports a different target for each perceived object, but this capability is currently not used and may become deprecated.
Nested Class Summary | |
---|---|
static class |
PerceptionMessage.ObjectNote
Described a gained or lost perceivable object. |
Constructor Summary | |
---|---|
PerceptionMessage()
No-arg constructor required for marshalling. |
|
PerceptionMessage(MessageType msgType)
Create message of the given message type. |
|
PerceptionMessage(MessageType msgType,
OID target)
Create message of the given message type and target. |
Method Summary | |
---|---|
PerceptionMessage.ObjectNote |
gainObject(OID targetOid,
OID subjectOid,
ObjectType objectType)
Add a gained object. |
void |
gainObject(PerceptionMessage.ObjectNote note)
Add a gained object. |
int |
getGainObjectCount()
Get number of gained objects. |
java.util.List<PerceptionMessage.ObjectNote> |
getGainObjects()
Get gained object list. |
int |
getLostObjectCount()
Get number of lost objects. |
java.util.List<PerceptionMessage.ObjectNote> |
getLostObjects()
Get lost object list. |
OID |
getTarget()
Get the message target. |
void |
lostObject(OID targetOid,
OID subjectOid)
Add a lost object. |
void |
lostObject(OID targetOid,
OID subjectOid,
ObjectType objectType)
Add a lost object. |
void |
lostObject(PerceptionMessage.ObjectNote note)
Add a lost object. |
void |
setTarget(OID target)
Set the message target OID. |
Methods inherited from class atavism.msgsys.Message |
---|
getEnqueueTime, getMsgId, getMsgType, getSenderName, isRPC, setEnqueueTime, setEnqueueTime, setMsgType, toBytes |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PerceptionMessage()
public PerceptionMessage(MessageType msgType)
public PerceptionMessage(MessageType msgType, OID target)
Method Detail |
---|
public OID getTarget()
getTarget
in interface HasTarget
public void setTarget(OID target)
setTarget
in interface HasTarget
public PerceptionMessage.ObjectNote gainObject(OID targetOid, OID subjectOid, ObjectType objectType)
public void gainObject(PerceptionMessage.ObjectNote note)
public void lostObject(OID targetOid, OID subjectOid)
public void lostObject(OID targetOid, OID subjectOid, ObjectType objectType)
public void lostObject(PerceptionMessage.ObjectNote note)
public java.util.List<PerceptionMessage.ObjectNote> getGainObjects()
public java.util.List<PerceptionMessage.ObjectNote> getLostObjects()
public int getGainObjectCount()
public int getLostObjectCount()
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |