Package marauroa.server.game.dbcommand
Class LoadCharacterCommand
java.lang.Object
marauroa.server.db.command.AbstractDBCommand
marauroa.server.game.dbcommand.DBCommandWithCallback
marauroa.server.game.dbcommand.LoadCharacterCommand
- All Implemented Interfaces:
DBCommand
- Direct Known Subclasses:
LoadActiveCharacterCommand
asynchronously loads a character's RPObject.
- Author:
- hendrik
-
Field Summary
Fields inherited from class marauroa.server.game.dbcommand.DBCommandWithCallback
callback
-
Constructor Summary
ConstructorDescriptionLoadCharacterCommand(String username, String character)
Creates a new LoadCharacterCommandLoadCharacterCommand(String username, String character, DelayedEventHandler callback, int clientid, Channel channel, int protocolVersion)
Creates a new LoadCharacterCommand -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute(DBTransaction transaction)
processes the database request.gets the name of the characterGets the RPObjectgets the usernametoString()
returns a string suitable for debug output of this DBCommand.Methods inherited from class marauroa.server.game.dbcommand.DBCommandWithCallback
getChannel, getClientid, getProtocolVersion, invokeCallback
Methods inherited from class marauroa.server.db.command.AbstractDBCommand
getEnqueueTime, getException, setEnqueueTime, setException
-
Constructor Details
-
LoadCharacterCommand
Creates a new LoadCharacterCommand- Parameters:
username
- name of accountcharacter
- 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 accountcharacter
- name of charactercallback
- DelayedEventHandlerclientid
- optional parameter available to the callbackchannel
- optional parameter available to the callbackprotocolVersion
- version of protocol
-
-
Method Details
-
execute
Description copied from class:AbstractDBCommand
processes the database request.- Specified by:
execute
in interfaceDBCommand
- Specified by:
execute
in classAbstractDBCommand
- Parameters:
transaction
- DBTransaction- Throws:
SQLException
- in case of an database errorIOException
- in case of an input/output error
-
getObject
Gets the RPObject- Returns:
- RPObject
-
getCharacterName
gets the name of the character- Returns:
- name of character
-
getUsername
gets the username- Returns:
- username
-
toString
returns a string suitable for debug output of this DBCommand.
-