|
|||||||||
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.server.engine.HookManager
public class HookManager
Manages hooks for processing messages coming in from a subscription. Hooks are associated with message types, which is a property in a message.
The EnginePlugin's onMessage() callback processes an incoming message by calling into its local HookManager and finding all matching hooks for the incoming message's message type for all the hooks. For each matching hook, it calls the hook's processMessage() method.
EnginePlugin.handleMessageImpl(atavism.msgsys.Message, int)
Constructor Summary | |
---|---|
HookManager()
Normally created by the EnginePlugin class. |
Method Summary | |
---|---|
void |
addHook(MessageType msgType,
Hook hook)
Adds a hook to the HookManager. |
java.util.List<Hook> |
getHooks(MessageType msgType)
Returns this list of all hooks matching the message type. |
void |
removeHook(MessageType msgType,
Hook hook)
Remove hook from the hook manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HookManager()
Method Detail |
---|
public void addHook(MessageType msgType, Hook hook)
msgType
- the message type to matchhook
- the hook to be called for matching messagesEnginePlugin.handleMessageImpl(atavism.msgsys.Message, int)
public void removeHook(MessageType msgType, Hook hook)
public java.util.List<Hook> getHooks(MessageType msgType)
msgType
- the message type to match
|
Copyright © 2018 Dragonsan Studios Sp. z o.o. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |