Class LoadCharacterCommand

All Implemented Interfaces:
DBCommand
Direct Known Subclasses:
LoadActiveCharacterCommand

public class LoadCharacterCommand extends DBCommandWithCallback
asynchronously loads a character's RPObject.
Author:
hendrik
  • Constructor Details

    • LoadCharacterCommand

      public LoadCharacterCommand(String username, String character)
      Creates a new LoadCharacterCommand
      Parameters:
      username - name of account
      character - name of character
    • LoadCharacterCommand

      public LoadCharacterCommand(String username, String character, DelayedEventHandler callback, int clientid, Channel channel, int protocolVersion)
      Creates a new LoadCharacterCommand
      Parameters:
      username - name of account
      character - name of character
      callback - DelayedEventHandler
      clientid - optional parameter available to the callback
      channel - optional parameter available to the callback
      protocolVersion - version of protocol
  • Method Details

    • execute

      public void execute(DBTransaction transaction) throws SQLException, IOException
      Description copied from class: AbstractDBCommand
      processes the database request.
      Specified by:
      execute in interface DBCommand
      Specified by:
      execute in class AbstractDBCommand
      Parameters:
      transaction - DBTransaction
      Throws:
      SQLException - in case of an database error
      IOException - in case of an input/output error
    • getObject

      public RPObject getObject()
      Gets the RPObject
      Returns:
      RPObject
    • getCharacterName

      public String getCharacterName()
      gets the name of the character
      Returns:
      name of character
    • getUsername

      public String getUsername()
      gets the username
      Returns:
      username
    • toString

      public String toString()
      returns a string suitable for debug output of this DBCommand.
      Overrides:
      toString in class Object
      Returns:
      debug string