Class MethodsConfig

java.lang.Object
com.slack.api.methods.MethodsConfig

public class MethodsConfig
extends java.lang.Object
Configuration for MethodsClient.
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  MethodsConfig.MethodsConfigBuilder  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static MethodsConfig DEFAULT_SINGLETON
    The default configuration.
    static java.lang.String DEFAULT_SINGLETON_EXECUTOR_NAME
    If you don't have a special reason, we recommend going with the singleton executor to track all the traffic your app generated towards the Slack Platform in one place (= in one metrics datastore).
  • Constructor Summary

    Constructors 
    Constructor Description
    MethodsConfig()  
    MethodsConfig​(boolean statsEnabled, java.lang.String executorName, int maxIdleMills, int defaultThreadPoolSize, java.util.Map<java.lang.String,​java.lang.Integer> customThreadPoolSizes, MetricsDatastore metricsDatastore)  
  • Method Summary

    Modifier and Type Method Description
    static MethodsConfig.MethodsConfigBuilder builder()  
    protected boolean canEqual​(java.lang.Object other)  
    boolean equals​(java.lang.Object o)  
    java.util.Map<java.lang.String,​java.lang.Integer> getCustomThreadPoolSizes()
    Team ID -> thread pool size
    int getDefaultThreadPoolSize()
    The default thread pool size used for asynchronous API method calls.
    java.lang.String getExecutorName()
    If you need to have multiple executors in the same Slack app, name this accordingly.
    int getMaxIdleMills()
    The max period to keep asynchronous API method calls idle.
    MetricsDatastore getMetricsDatastore()
    The metrics datastore to track the traffic associated to this executor name.
    int hashCode()  
    boolean isStatsEnabled()  
    void setCustomThreadPoolSizes​(java.util.Map<java.lang.String,​java.lang.Integer> customThreadPoolSizes)
    Team ID -> thread pool size
    void setDefaultThreadPoolSize​(int defaultThreadPoolSize)
    The default thread pool size used for asynchronous API method calls.
    void setExecutorName​(java.lang.String executorName)
    If you need to have multiple executors in the same Slack app, name this accordingly.
    void setMaxIdleMills​(int maxIdleMills)
    The max period to keep asynchronous API method calls idle.
    void setMetricsDatastore​(MetricsDatastore metricsDatastore)
    The metrics datastore to track the traffic associated to this executor name.
    void setStatsEnabled​(boolean statsEnabled)  
    java.lang.String toString()  

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • DEFAULT_SINGLETON_EXECUTOR_NAME

      public static final java.lang.String DEFAULT_SINGLETON_EXECUTOR_NAME
      If you don't have a special reason, we recommend going with the singleton executor to track all the traffic your app generated towards the Slack Platform in one place (= in one metrics datastore).
      See Also:
      Constant Field Values
    • DEFAULT_SINGLETON

      public static final MethodsConfig DEFAULT_SINGLETON
      The default configuration. It's not allowed to modify this runtime for any reasons.
  • Constructor Details

    • MethodsConfig

      public MethodsConfig()
    • MethodsConfig

      public MethodsConfig​(boolean statsEnabled, java.lang.String executorName, int maxIdleMills, int defaultThreadPoolSize, java.util.Map<java.lang.String,​java.lang.Integer> customThreadPoolSizes, MetricsDatastore metricsDatastore)
  • Method Details

    • builder

      public static MethodsConfig.MethodsConfigBuilder builder()
    • isStatsEnabled

      public boolean isStatsEnabled()
    • getExecutorName

      public java.lang.String getExecutorName()
      If you need to have multiple executors in the same Slack app, name this accordingly.
    • getMaxIdleMills

      public int getMaxIdleMills()
      The max period to keep asynchronous API method calls idle.
    • getDefaultThreadPoolSize

      public int getDefaultThreadPoolSize()
      The default thread pool size used for asynchronous API method calls.
    • getCustomThreadPoolSizes

      public java.util.Map<java.lang.String,​java.lang.Integer> getCustomThreadPoolSizes()
      Team ID -> thread pool size
    • getMetricsDatastore

      public MetricsDatastore getMetricsDatastore()
      The metrics datastore to track the traffic associated to this executor name.
    • setStatsEnabled

      public void setStatsEnabled​(boolean statsEnabled)
    • setExecutorName

      public void setExecutorName​(java.lang.String executorName)
      If you need to have multiple executors in the same Slack app, name this accordingly.
    • setMaxIdleMills

      public void setMaxIdleMills​(int maxIdleMills)
      The max period to keep asynchronous API method calls idle.
    • setDefaultThreadPoolSize

      public void setDefaultThreadPoolSize​(int defaultThreadPoolSize)
      The default thread pool size used for asynchronous API method calls.
    • setCustomThreadPoolSizes

      public void setCustomThreadPoolSizes​(java.util.Map<java.lang.String,​java.lang.Integer> customThreadPoolSizes)
      Team ID -> thread pool size
    • setMetricsDatastore

      public void setMetricsDatastore​(MetricsDatastore metricsDatastore)
      The metrics datastore to track the traffic associated to this executor name.
    • equals

      public boolean equals​(java.lang.Object o)
      Overrides:
      equals in class java.lang.Object
    • canEqual

      protected boolean canEqual​(java.lang.Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object