Package net.openosrs.api.input
Interface InputBackend
-
- All Known Implementing Classes:
PacketInputBackend
public interface InputBackendOne way of delivering aMenuRequestto the game.Backends are asked
supports(MenuRequest)beforesubmit(MenuRequest). Answeringfalseis how a backend declines work it cannot do honestly, and lets the router fall back rather than fail the caller. A backend that answerstrueand then rejects is reporting a genuine runtime condition, not a capability gap.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidanticipate(MenuRequest request)Optional hint that a request is likely imminent.default voidcancelPreparation()default booleanisAvailable()Whether the backend is currently able to run at all.default booleanisBusy()Temporary ownership contention is not an unsupported action.InputModemode()default booleanprepare(HoverIntent intent)Retain a preparation hint until it expires or is superseded; never click.SubmissionResultsubmit(MenuRequest request)booleansupports(MenuRequest request)Whether this backend can deliver the request at all.
-
-
-
Method Detail
-
mode
InputMode mode()
-
supports
boolean supports(MenuRequest request)
Whether this backend can deliver the request at all. Must not move the cursor, rotate the camera or otherwise change game state: this is a question, not an attempt.
-
submit
SubmissionResult submit(MenuRequest request)
-
isBusy
default boolean isBusy()
Temporary ownership contention is not an unsupported action.
-
anticipate
default void anticipate(MenuRequest request)
Optional hint that a request is likely imminent. Backends may use the spare time to start moving toward the target; the default does nothing. Callers must not rely on any observable effect.
-
prepare
default boolean prepare(HoverIntent intent)
Retain a preparation hint until it expires or is superseded; never click.
-
cancelPreparation
default void cancelPreparation()
-
isAvailable
default boolean isAvailable()
Whether the backend is currently able to run at all.
-
-