Atavism Version 2018.1AGIS API

atavism.msgsys
Class Message

java.lang.Object
  extended by atavism.msgsys.Message
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
AdvertiseMessage, AgentHelloMessage, AgentStateMessage, AllocNameMessage, AwaitPluginDependentsMessage, EnginePlugin.PluginStateMessage, EnginePlugin.TransferObjectMessage, FilterUpdateMessage, GenericMessage, HelloResponseMessage, InstanceClient.CreateInstanceMessage, InstanceClient.GetInstanceInfoMessage, InstanceClient.GetMatchingEntityOidsMessage, InstanceClient.GetNavMeshPathMessage, InstanceClient.GetRegionMessage, InstanceClient.RegisterInstanceTemplateMessage, InstanceClient.SetInstanceGroupMessage, MobManagerClient.CreateSpawnGeneratorMessage, MobManagerClient.SetAggroRadiusMessage, NamespaceMessage, NewAgentMessage, ObjectManagerClient.DeleteObjectMessage, ObjectManagerClient.FixWorldNodeMessage, ObjectManagerClient.GenerateObjectMessage, ObjectManagerClient.GetMatchingObjectsMessage, ObjectManagerClient.GetNamedObjectMessage, ObjectManagerClient.GetTemplateMessage, ObjectManagerClient.LoadObjectMessage, ObjectManagerClient.ModifyNamespaceMessage, ObjectManagerClient.RegisterTemplateMessage, ObjectManagerClient.SaveObjectMessage, ObjectManagerClient.UnloadObjectMessage, PerceptionMessage, PluginAvailableMessage, ResponseMessage, SearchMessage, SubjectMessage, SubscribeMessage, TargetMessage, UnsubscribeMessage, WorldManagerClient.HostInstanceMessage, WorldManagerClient.NewRegionMessage, WorldManagerClient.PerceiverRegionsMessage, WorldManagerClient.PlayerPathWMReqMessage, WorldManagerClient.SysChatMessage

public class Message
extends java.lang.Object
implements java.io.Serializable

Atavism message base-class.

See Also:
Serialized Form

Constructor Summary
Message()
           
Message(MessageType msgType)
          Create message of the given message type.
 
Method Summary
 long getEnqueueTime()
          Get the message enqueue time.
 long getMsgId()
          Get the message id.
 MessageType getMsgType()
          Get the message type.
 java.lang.String getSenderName()
          Get the sending agent name.
 boolean isRPC()
          True if the message is an RPC request.
 void setEnqueueTime()
          Set the message enqueue time to the current nano-second time.
 void setEnqueueTime(long when)
          Set the message enqueue time.
 void setMsgType(MessageType msgType)
          Set the message type.
static void toBytes(Message message, AOByteBuffer buffer)
          Internal use only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Message

public Message()

Message

public Message(MessageType msgType)
Create message of the given message type.

Method Detail

getMsgType

public MessageType getMsgType()
Get the message type.


setMsgType

public void setMsgType(MessageType msgType)
Set the message type.


getMsgId

public long getMsgId()
Get the message id. The message id is unique within the sending agent. The message ids will repeat if the agent restarts.


getSenderName

public java.lang.String getSenderName()
Get the sending agent name.

Returns:
Agent name or null if the message has not been sent.

getEnqueueTime

public long getEnqueueTime()
Get the message enqueue time.


setEnqueueTime

public void setEnqueueTime(long when)
Set the message enqueue time. Application callbacks can set the enqueue time prior to insertion to an application queue or thread pool.


setEnqueueTime

public void setEnqueueTime()
Set the message enqueue time to the current nano-second time. Application callbacks can set the enqueue time prior to insertion to an application queue or thread pool.


toBytes

public static void toBytes(Message message,
                           AOByteBuffer buffer)
Internal use only.


isRPC

public boolean isRPC()
True if the message is an RPC request.



Copyright © 2018 Dragonsan Studios Sp. z o.o.