Class DBCommandWithCallback

java.lang.Object
marauroa.server.db.command.AbstractDBCommand
marauroa.server.game.dbcommand.DBCommandWithCallback
All Implemented Interfaces:
DBCommand
Direct Known Subclasses:
LoadAllActiveCharactersCommand, LoadAllCharactersCommand, LoadBanListCommand, LoadCharacterCommand, LoginCommand

public abstract class DBCommandWithCallback extends AbstractDBCommand
A database command with callback support.
Author:
hendrik
  • Field Details

    • callback

      protected DelayedEventHandler callback
      a handler that will be informed about the result
  • Constructor Details

    • DBCommandWithCallback

      protected DBCommandWithCallback()
      Creates a new LoadCharacterCommand
    • DBCommandWithCallback

      protected DBCommandWithCallback(DelayedEventHandler callback, int clientid, Channel channel, int protocolVersion)
      Creates a new LoadCharacterCommand
      Parameters:
      callback - DelayedEventHandler
      clientid - optional parameter available to the callback
      channel - optional parameter available to the callback
      protocolVersion - protocolVersion
  • Method Details

    • getClientid

      public int getClientid()
      gets the clientid
      Returns:
      clientid
    • getChannel

      public Channel getChannel()
      gets the channel
      Returns:
      channel
    • getProtocolVersion

      public int getProtocolVersion()
      gets the protocol version
      Returns:
      protocolVersion
    • invokeCallback

      public void invokeCallback()
      invokes the callback.