Atavism Version 2018.1AGIS API

atavism.msgsys
Interface MessageDispatch

All Known Implementing Classes:
BaseBehavior, BasicQuestState, Behavior, ChatResponseBehavior, ChestBehavior, CombatBehavior, CombatPetBehavior, DotBehavior, LootBehavior, NonCombatPetBehavior, ObjectTracker, OpenBehavior, PatrolBehavior, PickupReactionBehavior, PlayerCorpseBehavior, ProximityTracker, QuestBehavior, QuestState, RadiusRoamBehavior, SpawnGenerator, TeleporterBehavior

public interface MessageDispatch

Mix-in interface for application message dispatchers (i.e. thread pools). If a message callback object implements MessageDispatch in addition to MessageCallback then messages will be sent to MessageDispatch.dispatchMessage() instead of MessageCallback.handleMessage().

Typically, dispatchMessage() inserts the message into a queue and returns. Then, a thread pool removes from the queue and calls MessageCallback.handleMessage(). The queue should pass the flags through unaltered.


Method Summary
 void dispatchMessage(Message message, int flags, MessageCallback callback)
          Dispatch message to queue or thread pool.
 

Method Detail

dispatchMessage

void dispatchMessage(Message message,
                     int flags,
                     MessageCallback callback)
Dispatch message to queue or thread pool. Implementations should pass the flags through unaltered.

Parameters:
message - Message sent from other agent.
flags - Bitwise OR of MessageCallback.NO_FLAGS, MessageCallback.RESPONSE_EXPECTED
callback - Callback to handle the message (currently, always the same as 'this').


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