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


Java CreatePlatformApplicationRequest.setAttributes方法代码示例

本文整理汇总了Java中com.amazonaws.services.sns.model.CreatePlatformApplicationRequest.setAttributes方法的典型用法代码示例。如果您正苦于以下问题:Java CreatePlatformApplicationRequest.setAttributes方法的具体用法?Java CreatePlatformApplicationRequest.setAttributes怎么用?Java CreatePlatformApplicationRequest.setAttributes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.amazonaws.services.sns.model.CreatePlatformApplicationRequest的用法示例。


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

示例1: createPlatformApplication

import com.amazonaws.services.sns.model.CreatePlatformApplicationRequest; //导入方法依赖的package包/类
private CreatePlatformApplicationResult createPlatformApplication(
		String applicationName, Platform platform, String principal,
		String credential) {
	CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest();
	Map<String, String> attributes = new HashMap<String, String>();
	attributes.put("PlatformPrincipal", principal);
	attributes.put("PlatformCredential", credential);
	platformApplicationRequest.setAttributes(attributes);
	platformApplicationRequest.setName(applicationName);
	platformApplicationRequest.setPlatform(platform.name());
	return snsClient.createPlatformApplication(platformApplicationRequest);
}
 
开发者ID:tonchidot,项目名称:aws-java-sns-mobile-push-sample,代码行数:13,代码来源:AmazonSNSClientWrapper.java

示例2: createPlatformApplication

import com.amazonaws.services.sns.model.CreatePlatformApplicationRequest; //导入方法依赖的package包/类
private CreatePlatformApplicationResult createPlatformApplication(
		String applicationName, Platform platform, String principal,
		String credential) {
	
	
	/*Creates a platform application object for one of the supported push notification services, such as APNS and GCM, 
	 * to which devices and mobile apps may register. You must specify PlatformPrincipal and PlatformCredential attributes 
	 * when using the CreatePlatformApplication action. 
	 * 
	 * The PlatformPrincipal is received from the notification service. 
	 * ---------------------------------------------------------------------
	 * For APNS/APNS_SANDBOX, PlatformPrincipal is "SSL certificate". 
	 * For GCM, PlatformPrincipal is not applicable. 
	 * For ADM, PlatformPrincipal is "client id". The PlatformCredential is also received from the notification service.
	 * ----------------------------------------------------------------------- 
	 * For APNS/APNS_SANDBOX, PlatformCredential is "private key". 
	 * For GCM, PlatformCredential is "API key". 
	 * For ADM, PlatformCredential is "client secret".
	 * -------------------------------------------------------------------------- 
	 * The PlatformApplicationArn that is returned when using CreatePlatformApplication is then used as 
	 * an attribute for the CreatePlatformEndpoint action. 
	 * For more information, see Using Amazon SNS Mobile Push Notifications .
	 * */
	
	
	
	CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest();
	Map<String, String> attributes = new HashMap<String, String>();
	attributes.put("PlatformPrincipal", principal);
	attributes.put("PlatformCredential", credential);
	platformApplicationRequest.setAttributes(attributes);
	platformApplicationRequest.setName(applicationName);
	platformApplicationRequest.setPlatform(platform.name());
	return snsClient.createPlatformApplication(platformApplicationRequest);
}
 
开发者ID:krito19,项目名称:DenunciaMXBackEnd,代码行数:36,代码来源:AmazonSNSClientWrapper.java

示例3: createPlatformApplication

import com.amazonaws.services.sns.model.CreatePlatformApplicationRequest; //导入方法依赖的package包/类
private CreatePlatformApplicationResult createPlatformApplication(
        String applicationName, Platform platform, String principal, String credential) {
    CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest();
    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("PlatformPrincipal", principal);
    attributes.put("PlatformCredential", credential);
    platformApplicationRequest.setAttributes(attributes);
    platformApplicationRequest.setName(applicationName);
    platformApplicationRequest.setPlatform(platform.name());
    return snsClient.createPlatformApplication(platformApplicationRequest);
}
 
开发者ID:daffodilistic,项目名称:aws-snsmobilepush,代码行数:12,代码来源:SNSMobilePush.java


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