当前位置: 首页>>代码示例>>Java>>正文


Java NexmoClient类代码示例

本文整理汇总了Java中com.nexmo.client.NexmoClient的典型用法代码示例。如果您正苦于以下问题:Java NexmoClient类的具体用法?Java NexmoClient怎么用?Java NexmoClient使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


NexmoClient类属于com.nexmo.client包,在下文中一共展示了NexmoClient类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: NexMoServiceImpl

import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Inject
public NexMoServiceImpl(Configuration configuration, Client client) {
  jwtAuthMethod = configuration.getJwtAuthMethod();
  this.client = client;

  LOGGER.debug("jwtAuthMethod: {}", jwtAuthMethod);

  nexmoClient = new NexmoClient(jwtAuthMethod);

  LOGGER.debug("client created!");
}
 
开发者ID:Nexmo,项目名称:comms-router,代码行数:12,代码来源:NexMoServiceImpl.java

示例2: nexmoClientBean

import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Bean
@Scope("singleton")
public NexmoClient nexmoClientBean() throws InvalidKeySpecException, NoSuchAlgorithmException, InvalidKeyException, IOException {
    AuthMethod tokenAuthMethod = new TokenAuthMethod(this.apiKey, this.apiSecret);
    AuthMethod jwtAuthMethod = new JWTAuthMethod(this.applicationId, new File(this.pathPrivateKey).toPath());
    return new NexmoClient(tokenAuthMethod, jwtAuthMethod);
}
 
开发者ID:peterjurkovic,项目名称:travel-agency,代码行数:8,代码来源:NexmoConfig.java

示例3: init

import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Override
public void init(Map<String, Object> settings) throws TigaseDBException, ConfigurationException {
    super.init(log, settings);

    String username = (String) settings.get("username");
    String password = (String) settings.get("password");
    if (username == null || password == null)
        throw new ConfigurationException("username and password are mandatory");

    final NexmoClient client = new NexmoClient(new TokenAuthMethod(username, password));
    smsClient = client.getSmsClient();
}
 
开发者ID:kontalk,项目名称:tigase-extension,代码行数:13,代码来源:NexmoSMSProvider.java

示例4: init

import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Override
public void init(Map<String, Object> settings) throws TigaseDBException, ConfigurationException {
    super.init(settings);
    brand = (String) settings.get("brand");

    String username = (String) settings.get("username");
    String password = (String) settings.get("password");
    if (username == null || password == null)
        throw new ConfigurationException("username and password are mandatory");

    final NexmoClient client = new NexmoClient(new TokenAuthMethod(username, password));
    verifyClient = client.getVerifyClient();
}
 
开发者ID:kontalk,项目名称:tigase-extension,代码行数:14,代码来源:NexmoVerifyProvider.java

示例5: VoiceService

import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Autowired
public VoiceService(NexmoClient nexmoClient, VoiceConfiguration configuration){
    this.nexmoClient = nexmoClient;
    this.configuration = configuration;
}
 
开发者ID:peterjurkovic,项目名称:travel-agency,代码行数:6,代码来源:VoiceService.java

示例6: VerifyService

import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Autowired
public VerifyService(NexmoClient nexmoClient){
    this.nexmoClient = nexmoClient;
}
 
开发者ID:peterjurkovic,项目名称:travel-agency,代码行数:5,代码来源:VerifyService.java


注:本文中的com.nexmo.client.NexmoClient类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。