Class SessionController.ShardedGateway

  • Enclosing interface:
    SessionController

    public static class SessionController.ShardedGateway
    extends java.lang.Object
    POJO containing the gateway endpoint and recommended shard total for a shard manager.
    • Constructor Summary

      Constructors 
      Constructor Description
      ShardedGateway​(java.lang.String url, int shardTotal)
      Creates a new GatewayBot instance with the provided properties
      ShardedGateway​(java.lang.String url, int shardTotal, int concurrency)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getConcurrency()
      The concurrency level for this bot.
      int getShardTotal()
      The recommended shard total
      java.lang.String getUrl()
      The gateway endpoint
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ShardedGateway

        public ShardedGateway​(java.lang.String url,
                              int shardTotal)
        Creates a new GatewayBot instance with the provided properties
        Parameters:
        url - The gateway endpoint (wss)
        shardTotal - The recommended shard total
      • ShardedGateway

        public ShardedGateway​(java.lang.String url,
                              int shardTotal,
                              int concurrency)
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
        The gateway endpoint
        Returns:
        The endpoint
      • getShardTotal

        public int getShardTotal()
        The recommended shard total
        Returns:
        The shard total
      • getConcurrency

        public int getConcurrency()
        The concurrency level for this bot.
        This should not be a custom value as discord determines the eligible concurrency. Using a different concurrency value could result in issues and possibly a ban due to login spam.
        Returns:
        The concurrency level
        See Also:
        SessionController.setConcurrency(int)