Interface AgentConnection.Listener

All Known Implementing Classes:
CloudSession.SessionAgentListener
Enclosing class:
AgentConnection

static interface AgentConnection.Listener
Callbacks to the owner (the cloud session). Never invoked while this monitor is held.
  • Method Details

    • onStateChanged

      default void onStateChanged(AgentConnection.State state)
      Parameters:
      state - the new state, once per real transition
    • onCredentialRejected

      default void onCredentialRejected(int statusOrCloseCode, String requestIdOrNull)
      Parameters:
      statusOrCloseCode - 401 or 4401
      requestIdOrNull - the refused response's request id
    • onUpgradeRequired

      default void onUpgradeRequired(String minFrameworkOrNull, String requestIdOrNull)
      Parameters:
      minFrameworkOrNull - the minimum framework the gateway accepts, sanitised
      requestIdOrNull - the refused response's request id
    • onSuperseded

      default void onSuperseded()
      Too many consecutive supersessions; retrying stopped, credential kept.
    • onServerIdMismatch

      default void onServerIdMismatch()
      The welcome named another server id; retrying stopped, credential kept.
    • onPlanLimited

      default void onPlanLimited(UpgradeRejection notice)
      Parameters:
      notice - the first 402 response of a plan-limit episode; once per episode
    • onOpened

      default void onOpened()
      The upgrade was accepted.
    • onText

      default void onText(String text)
      Parameters:
      text - an inbound text frame other than the heartbeat reply