Interface SessionController.SessionConnectNode

Enclosing interface:
SessionController

public static interface SessionController.SessionConnectNode
Represents a WebSocketClient request to start a session.
Not implemented by library user.

Note: None of the provided session nodes can be resumed, the resume timeframe has already passed

  • Method Summary

    Modifier and Type
    Method
    Description
    The JDA instance for this request
    The ShardInfo for this request.
    boolean
    Whether this node is reconnecting.
    void
    run(boolean isLast)
    When called, establishes the session.
  • Method Details

    • isReconnect

      boolean isReconnect()
      Whether this node is reconnecting. Can be used to setup a priority based system.
      Returns:
      True, if this session is reconnecting
    • getJDA

      @Nonnull JDA getJDA()
      The JDA instance for this request
      Returns:
      The JDA instance
    • getShardInfo

      @Nonnull JDA.ShardInfo getShardInfo()
      The ShardInfo for this request.
      Can be used for a priority system.
      Returns:
      The ShardInfo
    • run

      void run(boolean isLast) throws InterruptedException
      When called, establishes the session.
      This will return once the required payload to start the session has been delivered.
      Parameters:
      isLast - True, if this is the last node in a queue worker. When true this will not wait for the payload to be delivered.
      Throws:
      InterruptedException - If the calling thread is interrupted