Example usage for com.amazonaws.services.sns.model CreatePlatformApplicationRequest setName

List of usage examples for com.amazonaws.services.sns.model CreatePlatformApplicationRequest setName

Introduction

In this page you can find the example usage for com.amazonaws.services.sns.model CreatePlatformApplicationRequest setName.

Prototype


public void setName(String name) 

Source Link

Document

Application names must be made up of only uppercase and lowercase ASCII letters, numbers, underscores, hyphens, and periods, and must be between 1 and 256 characters long.

Usage

From source file:AmazonSNSClientWrapper.java

License:Open Source License

private CreatePlatformApplicationResult createPlatformApplication(String applicationName,
        SampleMessageGenerator.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);
}

From source file:com.aws.sns.service.notifications.sns.AmazonSNSClientWrapper.java

License:Open Source License

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);
}

From source file:com.dev.appx.sns.tools.AmazonSNSClientWrapper.java

License:Open Source License

public 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);
}

From source file:com.mistminds.service.AmazonSNSClientWrapper.java

License:Open Source License

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("GCM");
    return snsClient.createPlatformApplication(platformApplicationRequest);
}

From source file:com.screensaver.util.AmazonSNSClientWrapper.java

License:Open Source License

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);
}

From source file:edu.utn.frba.grupo5303.serverenviolibre.services.NotificacionesPushService.java

private CreatePlatformApplicationResult createPlatformApplication() {
    CreatePlatformApplicationRequest platformApplicationRequest = new CreatePlatformApplicationRequest();
    Map<String, String> attributes = new HashMap<>();
    attributes.put("PlatformPrincipal", applicationName);
    attributes.put("PlatformCredential", serverAPIKey);
    platformApplicationRequest.setAttributes(attributes);
    platformApplicationRequest.setName(applicationName);
    platformApplicationRequest.setPlatform(plataforma.name());
    return snsClient.createPlatformApplication(platformApplicationRequest);
}