本文整理汇总了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!");
}
示例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);
}
示例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();
}
示例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();
}
示例5: VoiceService
import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Autowired
public VoiceService(NexmoClient nexmoClient, VoiceConfiguration configuration){
this.nexmoClient = nexmoClient;
this.configuration = configuration;
}
示例6: VerifyService
import com.nexmo.client.NexmoClient; //导入依赖的package包/类
@Autowired
public VerifyService(NexmoClient nexmoClient){
this.nexmoClient = nexmoClient;
}