com.electrotank.electroserver5.extensions
Class BaseEvent

java.lang.Object
  extended by com.electrotank.electroserver5.extensions.BaseEvent
All Implemented Interfaces:
EventHandler, EventHandlerLifeCycle, ExtensionLifeCycle
Direct Known Subclasses:
BaseBuddyListEventHandler, BaseExtensionLifecycleEventHandler, BaseLoginEventHandler, BaseLogoutEventHandler, BasePrivateMessageEventHandler, BasePublicMessageEventHandler, BaseRoomTrackingEventHandler, BaseUserTrackingEventHandler, BaseUserVariableEventHandler

public class BaseEvent
extends Object
implements EventHandler, EventHandlerLifeCycle


Constructor Summary
BaseEvent()
           
 
Method Summary
 void destroy()
          Automatically invoked when the object class is destroyed.
 EventApi getApi()
          Returns the api for any class that implements this interface.
 void init(EsObjectRO parameters)
          Automatically invoked when the object class is instantiated, after api is available.
 void setApi(EventApi api)
          Sets the api.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseEvent

public BaseEvent()
Method Detail

init

public void init(EsObjectRO parameters)
Description copied from interface: ExtensionLifeCycle
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.

Specified by:
init in interface ExtensionLifeCycle
Parameters:
parameters - EsObjectRO that may contain XML parameters to be read
See Also:
EsObjectRO, ExtensionComponentConfiguration, RoomConfiguration, GameConfiguration

destroy

public void destroy()
Description copied from interface: ExtensionLifeCycle
Automatically invoked when the object class is destroyed.

Specified by:
destroy in interface ExtensionLifeCycle

getApi

public EventApi getApi()
Description copied from interface: EventHandler
Returns the api for any class that implements this interface. When implementing, simply return the variable api, which will be automatically injected into the class.

Specified by:
getApi in interface EventHandler
Returns:
EventApi api

setApi

public void setApi(EventApi api)
Description copied from interface: EventHandler
Sets the api. When implementing, simply use this.api = api.

Specified by:
setApi in interface EventHandler
Parameters:
api - api for the EventHandler


Copyright © 2007-2010 Electrotank, Inc. All Rights Reserved.