com.electrotank.electroserver4.extensions
Interface ExtensionLifeCycle

All Known Subinterfaces:
EventHandlerLifeCycle, ExtensionEventHandler, ManagedObjectFactoryLifeCycle, PluginLifeCycle
All Known Implementing Classes:
BaseEvent, BaseLoginEventHandler, BaseLogoutEventHandler, BaseManagedObjectFactory, BasePlugin

public interface ExtensionLifeCycle

Interface for automatic initialization of extensions and plugins. Implement this interface with a class that is a plugin, and when the plugin is instantiated, after the api is injected the init method will be executed. Every server level component of an extension should implement this interface or one of its subclasses.


Method Summary
 void destroy()
          Automatically invoked when the object class is destroyed.
 void init(EsObjectRO parameters)
          Automatically invoked when the object class is instantiated, after api is available.
 

Method Detail

init

void init(EsObjectRO parameters)
Automatically invoked when the object class is instantiated, after api is available. Usually initializes the extension's ExtensionComponentConfiguration, RoomConfiguration, and if it is a game, the GameConfiguration. If there are any variables for the plugin in the Extension.xml file, they will be found in the parameters EsObjectRO.

Parameters:
parameters - EsObjectRO that may contain XML parameters to be read
See Also:
EsObjectRO, ExtensionComponentConfiguration, RoomConfiguration, GameConfiguration

destroy

void destroy()
Automatically invoked when the object class is destroyed.



Copyright © 2007 Electrotank, Inc. All Rights Reserved.