Interface InputBackend

  • All Known Implementing Classes:
    PacketInputBackend

    public interface InputBackend
    One way of delivering a MenuRequest to the game.

    Backends are asked supports(MenuRequest) before submit(MenuRequest). Answering false is how a backend declines work it cannot do honestly, and lets the router fall back rather than fail the caller. A backend that answers true and then rejects is reporting a genuine runtime condition, not a capability gap.

    • Method Detail

      • 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.
      • 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.