Class AbstractHandler

java.lang.Object
com.tenio.common.logger.AbstractLogger
com.tenio.common.logger.SystemLogger
com.tenio.core.handler.AbstractHandler
Direct Known Subclasses:
AbstractClientCommandHandler, AbstractSystemCommandHandler

public abstract class AbstractHandler extends com.tenio.common.logger.SystemLogger
This class provides all the necessary APIs for a logic game handling.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected final ServerApi
    api()
    Retrieves the server supported API responsible object.
    protected final com.tenio.common.data.zero.ZeroArray
    Retrieves a zero array instance when the DataType in use is DataType.ZERO.
    protected final ClientCommandManager
    Retrieves a management object of self-defined user commands.
    protected final com.tenio.common.data.zero.ZeroMap
    map()
    Retrieves a zero map instance when the DataType in use is DataType.ZERO.
    protected final com.tenio.common.data.msgpack.element.MsgPackArray
    Retrieves a msgpack array instance when the DataType in use is DataType.MSG_PACK.
    protected final com.tenio.common.data.msgpack.element.MsgPackMap
    Retrieves a msgpack map instance when the DataType in use is DataType.MSG_PACK.
    protected final Response
    Retrieves a response object which is using to send responses to clients side.
    Retrieves an initialized room setting.

    Methods inherited from class com.tenio.common.logger.SystemLogger

    debug, debugEvent, isDebugEnabled, isTraceEnabled, trace, trace

    Methods inherited from class com.tenio.common.logger.AbstractLogger

    buildgen, error, error, error, info, info, info, info, info, info, info, info, isErrorEnabled, isInfoEnabled

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AbstractHandler

      public AbstractHandler()
  • Method Details

    • api

      protected final ServerApi api()
      Retrieves the server supported API responsible object.
      Returns:
      an instance of ServerApi.
    • clientCommand

      protected final ClientCommandManager clientCommand()
      Retrieves a management object of self-defined user commands.
      Returns:
      an instance of ClientCommandManager
      Since:
      0.5.0
    • response

      protected final Response response()
      Retrieves a response object which is using to send responses to clients side.
      Returns:
      an instance of Response
    • array

      protected final com.tenio.common.data.zero.ZeroArray array()
      Retrieves a zero array instance when the DataType in use is DataType.ZERO.
      Returns:
      an instance of ZeroArray
    • map

      protected final com.tenio.common.data.zero.ZeroMap map()
      Retrieves a zero map instance when the DataType in use is DataType.ZERO.
      Returns:
      an instance of ZeroMap
    • msgarray

      protected final com.tenio.common.data.msgpack.element.MsgPackArray msgarray()
      Retrieves a msgpack array instance when the DataType in use is DataType.MSG_PACK.
      Returns:
      an instance of MsgPackArray
    • msgmap

      protected final com.tenio.common.data.msgpack.element.MsgPackMap msgmap()
      Retrieves a msgpack map instance when the DataType in use is DataType.MSG_PACK.
      Returns:
      an instance of MsgPackMap
    • roomSetting

      protected InitialRoomSetting.Builder roomSetting()
      Retrieves an initialized room setting.
      Returns:
      an instance of InitialRoomSetting.Builder