List of usage examples for com.amazonaws.services.dynamodbv2 AmazonDynamoDBClient builder
public static AmazonDynamoDBClientBuilder builder()
From source file:com.vitembp.embedded.data.UuidStringStoreDynamoDB.java
License:Open Source License
/** * Initializes a new instance of the UuidStringStoreH2 class. * @param dataFile The file to store the database to. *//*ww w. ja v a 2 s . c o m*/ UuidStringStoreDynamoDB() { // builds a client with credentials this.client = AmazonDynamoDBClient.builder().build(); }
From source file:com.vitembp.embedded.interfaces.AmazonSQSControl.java
License:Open Source License
/** * Initializes a new instance of the AmazonSQSControl class. * @param queueName The name of the queue to connect to. * @param msgParser The parser that handles messages. * @param threads The number of message handling threads. *///from ww w . j a va 2s .c o m public AmazonSQSControl(String queueName, Function<String, String> msgParser, int threads) { // save thread count this.threadCount = threads; // create client to use to communicate with sqs this.sqsClient = AmazonSQSClientBuilder.defaultClient(); // save the function which parses messages this.messageParser = msgParser; // save the name of the queue for this device this.queueName = queueName; // build DynamoDB client with default credentials this.client = AmazonDynamoDBClient.builder().build(); }
From source file:org.smap.notifications.interfaces.EmitDeviceNotification.java
License:Open Source License
public EmitDeviceNotification() { // get properties file try {/* w w w . j a va2s. c o m*/ properties.load(new FileInputStream("/smap_bin/resources/properties/aws.properties")); tableName = properties.getProperty("userDevices_table"); region = properties.getProperty("userDevices_region"); platformApplicationArn = properties.getProperty("fieldTask_platform"); } catch (Exception e) { log.log(Level.SEVERE, "Error reading properties", e); } //create a new DynamoDB client dynamoDB = AmazonDynamoDBClient.builder().withRegion(region) .withCredentials(new ProfileCredentialsProvider()).build(); //create a new SNS client AmazonSNS sns = AmazonSNSClient.builder().withRegion(region) .withCredentials(new ProfileCredentialsProvider()).build(); // create a wraper snsClientWrapper = new AmazonSNSClientWrapper(sns); }