Package marauroa.server.game.dbcommand
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
A database command with callback support.
- Author:
- hendrik
-
Field Summary
Modifier and TypeFieldDescriptionprotected DelayedEventHandler
a handler that will be informed about the result -
Constructor Summary
ModifierConstructorDescriptionprotected
Creates a new LoadCharacterCommandprotected
DBCommandWithCallback(DelayedEventHandler callback, int clientid, Channel channel, int protocolVersion)
Creates a new LoadCharacterCommand -
Method Summary
Modifier and TypeMethodDescriptiongets the channelint
gets the clientidint
gets the protocol versionvoid
invokes the callback.Methods inherited from class marauroa.server.db.command.AbstractDBCommand
execute, getEnqueueTime, getException, setEnqueueTime, setException
-
Field Details
-
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
- DelayedEventHandlerclientid
- optional parameter available to the callbackchannel
- optional parameter available to the callbackprotocolVersion
- protocolVersion
-
-
Method Details
-
getClientid
public int getClientid()gets the clientid- Returns:
- clientid
-
getChannel
gets the channel- Returns:
- channel
-
getProtocolVersion
public int getProtocolVersion()gets the protocol version- Returns:
- protocolVersion
-
invokeCallback
public void invokeCallback()invokes the callback.
-