Class CommandState
java.lang.Object
com.yubico.yubikit.core.application.CommandState
Provides control over an ongoing YubiKey operation.
Override onKeepAliveMessage to react to keepalive messages send periodically from the YubiKey.
Call cancel() to cancel an ongoing operation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final bytestatic final byte -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidcancel()Cancel an ongoing CTAP2 command, by sending a CTAP cancel command.voidonKeepAliveStatus(byte status) Override this method to handle keep-alive messages sent from the YubiKey.final booleanwaitForCancel(long ms)
-
Field Details
-
STATUS_PROCESSING
public static final byte STATUS_PROCESSING- See Also:
-
STATUS_UPNEEDED
public static final byte STATUS_UPNEEDED- See Also:
-
-
Constructor Details
-
CommandState
public CommandState()
-
-
Method Details
-
onKeepAliveStatus
public void onKeepAliveStatus(byte status) Override this method to handle keep-alive messages sent from the YubiKey. The default implementation will log the event.- Parameters:
status- The keep alive status byte
-
cancel
public final void cancel()Cancel an ongoing CTAP2 command, by sending a CTAP cancel command. This will cause the YubiKey to return a CtapError with the error code 0x2d (ERR_KEEPALIVE_CANCEL). -
waitForCancel
public final boolean waitForCancel(long ms)
-