Atavism Version 2018.1AGIS API

atavism.agis.plugins
Class DataLoggerPlugin

java.lang.Object
  extended by atavism.server.engine.EnginePlugin
      extended by atavism.agis.plugins.DataLoggerPlugin
All Implemented Interfaces:
MessageCallback, StatusMapCallback

public class DataLoggerPlugin
extends EnginePlugin

Handles logging the events that occur. Also deals with storing player stats and updating achievements.

Author:
Andrew

Nested Class Summary
 class DataLoggerPlugin.DataLogMessageHook
           
 class DataLoggerPlugin.LogEventHook
          Handles an event, determining the type and the data associated with it, then updating the involved players stats and achievements.
 
Nested classes/interfaces inherited from class atavism.server.engine.EnginePlugin
EnginePlugin.DeleteHook, EnginePlugin.DeleteSubObjHook, EnginePlugin.GenerateSubObjectHook, EnginePlugin.GetPropertyMessage, EnginePlugin.GetPropertyNamesMessage, EnginePlugin.LoadHook, EnginePlugin.LoadSubObjHook, EnginePlugin.PluginActivateHook, EnginePlugin.PluginStateMessage, EnginePlugin.SaveHook, EnginePlugin.SaveSubObjHook, EnginePlugin.SetPropertyMessage, EnginePlugin.SubObjData, EnginePlugin.TransferFilter, EnginePlugin.TransferObjectMessage, EnginePlugin.UnloadHook, EnginePlugin.UnloadSubObjHook
 
Field Summary
protected static AccountDatabase accDB
           
protected  java.util.HashMap<java.lang.Integer,Achievement> achievements
           
protected static AdminQueries logQueries
           
protected static java.lang.String LOGS_DIR
           
protected static java.io.FileWriter out
           
static java.lang.String PLUGIN_NAME
           
 
Fields inherited from class atavism.server.engine.EnginePlugin
deleteSubObjectSubscription, dumpAllThreadSubscription, dumpAllThreadSubscriptionLock, loadSubObjectSubscription, lock, MSG_TYPE_DUMP_ALL_THREAD_STACKS, MSG_TYPE_GET_PROPERTY, MSG_TYPE_GET_PROPERTY_NAMES, MSG_TYPE_PLUGIN_STATE, MSG_TYPE_SET_PROPERTY, MSG_TYPE_SET_PROPERTY_NONBLOCK, MSG_TYPE_TRANSFER_OBJECT, pluginStateSubscription, propertySubscription, saveSubObjectSubscription, selectionFilter, selectionSubscription, setSubObjectPersistenceSubscription, subObjectSubscription, unloadSubObjectSubscription
 
Fields inherited from interface atavism.msgsys.MessageCallback
NO_FLAGS, RESPONSE_EXPECTED
 
Constructor Summary
DataLoggerPlugin()
           
 
Method Summary
 java.lang.String encode(java.lang.String inStr)
           
 java.lang.String getName()
          Returns the name of the plugin.
 void onActivate()
          for developers extending the EnginePlugin object, it may be easier to use the onActivate() method which gets called when the plugin is being activated by the Engine.
 void registerHooks()
           
protected  void writeData(java.lang.String worldName, java.lang.String dataName, long timestamp, OID sourceOid, OID targetOid, OID accountId, java.lang.String data)
           
 
Methods inherited from class atavism.server.engine.EnginePlugin
activate, createMBeanInstance, createSubscription, getHookManager, getMessageHandler, getObjectLockManager, getObjectProperties, getObjectProperties, getObjectProperty, getObjectPropertyNames, getPercentCPULoad, getPluginAvailable, getPluginInfo, getPluginNamespaces, getPluginState, getPluginStatus, getPluginType, getPropertyImpl, getPropertyNamesImpl, getStatusMap, handleMessage, handleMessageImpl, logDepsOutstanding, processKeysAndValues, registerActivateHook, registerDeleteHook, registerLoadHook, registerPluginNamespace, registerPluginNamespaces, registerPluginNamespaces, registerPluginNamespaces, registerSaveHook, registerTransferHook, registerUnloadHook, sendSubObjectResponse, sendSubObjectResponse, sendSubObjectResponse, setMessageHandler, setName, setObjectProperties, setObjectProperties, setObjectProperties, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectPropertiesNoResponse, setObjectProperty, setObjectPropertyNoResponse, setPercentCPULoad, setPluginAvailable, setPluginInfo, setPluginType, setPropertyImpl, transferObject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PLUGIN_NAME

public static final java.lang.String PLUGIN_NAME
See Also:
Constant Field Values

LOGS_DIR

protected static final java.lang.String LOGS_DIR

out

protected static java.io.FileWriter out

logQueries

protected static AdminQueries logQueries

accDB

protected static AccountDatabase accDB

achievements

protected java.util.HashMap<java.lang.Integer,Achievement> achievements
Constructor Detail

DataLoggerPlugin

public DataLoggerPlugin()
Method Detail

getName

public java.lang.String getName()
Description copied from class: EnginePlugin
Returns the name of the plugin. Engine.registerPlugin() will call this method and associate the name with the plugin, which can be retrieved by calling Engine.getPlugin()

Overrides:
getName in class EnginePlugin
Returns:
the name of this plugin
See Also:
EnginePlugin.setName(String)

onActivate

public void onActivate()
Description copied from class: EnginePlugin
for developers extending the EnginePlugin object, it may be easier to use the onActivate() method which gets called when the plugin is being activated by the Engine. this is an alternative to calling registerActivateHook()

Overrides:
onActivate in class EnginePlugin

registerHooks

public void registerHooks()

writeData

protected void writeData(java.lang.String worldName,
                         java.lang.String dataName,
                         long timestamp,
                         OID sourceOid,
                         OID targetOid,
                         OID accountId,
                         java.lang.String data)

encode

public java.lang.String encode(java.lang.String inStr)


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