Atavism Version 2018.1AGIS API

atavism.server.engine
Class EnginePlugin.GenerateSubObjectHook

java.lang.Object
  extended by atavism.server.engine.EnginePlugin.GenerateSubObjectHook
All Implemented Interfaces:
Hook
Direct Known Subclasses:
BillingPlugin.BillingSubObjectHook, ClassAbilityPlugin.ClassAbilitySubObjectHook, CurrencyPlugin.CurrencyPluginGenerateSubObjectHook, FactionPlugin.FactionSubObjectHook, QuestPlugin.QuestSubObjectHook, SocialPlugin.SocialSubObjectHook, TrainerPlugin.TrainerSubObjectHook, VendorPlugin.VendorSubObjectHook
Enclosing class:
EnginePlugin

public abstract static class EnginePlugin.GenerateSubObjectHook
extends java.lang.Object
implements Hook

A hook to process the GenerateSubObjectMessage, sent by the object manager.


Field Summary
 EnginePlugin plugin
          The plugin instance.
 
Constructor Summary
EnginePlugin.GenerateSubObjectHook(EnginePlugin plugin)
          Bind the plugin instance to the plugin data member.
 
Method Summary
abstract  EnginePlugin.SubObjData generateSubObject(Template template, Namespace namespace, OID masterOid)
          Returns a SubObjData instance.
 boolean processMessage(Message m, int flags)
          Generates the sub-object based on the template, namespace and oid contained in the GenerateSubObjectMessage by calling the plugin's generateSubObject method, and then sends the response by calling sendSubObjectResponse().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

plugin

public EnginePlugin plugin
The plugin instance.

Constructor Detail

EnginePlugin.GenerateSubObjectHook

public EnginePlugin.GenerateSubObjectHook(EnginePlugin plugin)
Bind the plugin instance to the plugin data member.

Parameters:
plugin - The plugin instance creating the hook.
Method Detail

processMessage

public boolean processMessage(Message m,
                              int flags)
Generates the sub-object based on the template, namespace and oid contained in the GenerateSubObjectMessage by calling the plugin's generateSubObject method, and then sends the response by calling sendSubObjectResponse().

Specified by:
processMessage in interface Hook
Parameters:
m - The GenerateSubObjectMessage message
flags - The message flags
Returns:
Returns true if hook chain processing should continue.

generateSubObject

public abstract EnginePlugin.SubObjData generateSubObject(Template template,
                                                          Namespace namespace,
                                                          OID masterOid)
Returns a SubObjData instance.

Parameters:
template - The template used to create the sub-object
Returns:
A SubObjData instance, when all dependencies are resolved. (The list of dependencies can be null).


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