Enum Class SmsProviderType

java.lang.Object
java.lang.Enum<SmsProviderType>
cloud.opencode.base.sms.config.SmsProviderType
All Implemented Interfaces:
Serializable, Comparable<SmsProviderType>, Constable

public enum SmsProviderType extends Enum<SmsProviderType>
SMS Provider Type 短信提供商类型

Supported SMS provider types.

支持的短信提供商类型。

Features | 主要功能:

  • Built-in providers: Aliyun, Tencent, Huawei, Baidu, Twilio, AWS SNS - 内置提供商
  • Console mock provider for testing - 控制台模拟提供商用于测试
  • Custom provider extension support - 自定义提供商扩展支持

Usage Examples | 使用示例:

SmsProviderType type = SmsProviderType.ALIYUN;
String code = type.getCode(); // "aliyun"

Security | 安全性:

  • Thread-safe: Yes (enum is immutable) - 线程安全: 是(枚举不可变)
Since:
JDK 25, opencode-base-sms V1.0.0
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Enum Constant Details

    • ALIYUN

      public static final SmsProviderType ALIYUN
      Aliyun SMS (阿里云短信)
    • TENCENT

      public static final SmsProviderType TENCENT
      Tencent Cloud SMS (腾讯云短信)
    • HUAWEI

      public static final SmsProviderType HUAWEI
      Huawei Cloud SMS (华为云短信)
    • BAIDU

      public static final SmsProviderType BAIDU
      Baidu Cloud SMS (百度云短信)
    • TWILIO

      public static final SmsProviderType TWILIO
      Twilio SMS
    • AWS_SNS

      public static final SmsProviderType AWS_SNS
      AWS SNS
    • CONSOLE

      public static final SmsProviderType CONSOLE
      Console mock provider (控制台模拟提供商)
    • CUSTOM

      public static final SmsProviderType CUSTOM
      Custom provider (自定义提供商)
  • Method Details

    • values

      public static SmsProviderType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static SmsProviderType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getCode

      public String getCode()
    • fromCode

      public static SmsProviderType fromCode(String code)