Package com.tapkey.mobile.model
Class CommandResult
- java.lang.Object
-
- com.tapkey.mobile.model.CommandResult
-
public class CommandResult extends Object
The result of a command, returned by a Tapkey lock. Contains a result code and additional response data.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandResult.CommandResultCode
Represents a command's result code.static class
CommandResult.UserCommandResult
The result of a user command.
-
Constructor Summary
Constructors Constructor Description CommandResult(Date lockTime, net.tpky.mc.model.ServerClockTime serverTime, CommandResult.CommandResultCode commandResultCode, Object responseData, List<CommandResult.UserCommandResult> userCommandResults, net.tpky.mc.tlcp.model.PublicState publicState)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Integer
getBatteryWarnLevel()
Returns the lock's battery warning level.CommandResult.CommandResultCode
getCommandResultCode()
Returns the result code of this command.Date
getLockTime()
Returns the time on the lock when the command was executed.Object
getResponseData()
Reserved for internal use.net.tpky.mc.model.ServerClockTime
getServerTime()
Returns the time on the Tapkey Trust Service when the command was executed.List<CommandResult.UserCommandResult>
getUserCommandResults()
Reserved for internal use.Boolean
isBound()
Returns whether the lock is bound or not.
-
-
-
Constructor Detail
-
CommandResult
public CommandResult(Date lockTime, net.tpky.mc.model.ServerClockTime serverTime, CommandResult.CommandResultCode commandResultCode, Object responseData, List<CommandResult.UserCommandResult> userCommandResults, net.tpky.mc.tlcp.model.PublicState publicState)
-
-
Method Detail
-
getLockTime
public Date getLockTime()
Returns the time on the lock when the command was executed.- Returns:
- the time on the lock.
-
getServerTime
public net.tpky.mc.model.ServerClockTime getServerTime()
Returns the time on the Tapkey Trust Service when the command was executed.- Returns:
- the time on the Tapkey Trust Service.
-
getCommandResultCode
public CommandResult.CommandResultCode getCommandResultCode()
Returns the result code of this command. The result code must be inspected in order to retrieve information on whether the command ran successfully or not.- Returns:
- the command's result code.
-
getResponseData
public Object getResponseData()
Reserved for internal use.
-
getUserCommandResults
public List<CommandResult.UserCommandResult> getUserCommandResults()
Reserved for internal use. May be treated likeCommandResult.CommandResultCode.TechnicalError
.
-
getBatteryWarnLevel
public Integer getBatteryWarnLevel()
Returns the lock's battery warning level. Interpretation of this value is specific to the type of lock. Consult the lock manufacturer for more information. Zero-values will usually indicate a good battery.- Returns:
- the lock's battery warning level.
-
isBound
public Boolean isBound()
Returns whether the lock is bound or not.- Returns:
- true, if the lock is bound or false if not.
-
-