コード例 #1
0
  private void preloadJournal(TravelLogDAO dao, Logger logger) {

    Configuration config = Configuration.getInstance();
    String bucket = config.getProperty("bundleBucket");
    String path = config.getProperty("bundlePath");
    DataLoader loader = new DataLoader(bucket, path, dao);
    Thread thread = new Thread(loader);
    thread.start();
    try {
      thread.join();
    } catch (InterruptedException e) {
      // TODO Auto-generated catch block
      logger.log(Level.WARNING, e.getMessage(), e);
    }
  }
コード例 #2
0
 static {
   AWSCredentials creds = new BasicAWSCredentials(getKey(), getSecret());
   snsClient = new AmazonSNSClient(creds);
   String snsEndpoint =
       Configuration.getInstance().getServiceEndpoint(Configuration.SNS_ENDPOINT_KEY);
   if (snsEndpoint != null) {
     snsClient.setEndpoint(snsEndpoint);
   }
 }
コード例 #3
0
 // Initialize the unique bucket name
 static {
   Configuration config = Configuration.getInstance();
   uniqueBucketName =
       (config.getProperty("accessKey") + "-" + PHOTO_BUCKET)
           .toLowerCase(); // AWSSDK requires bucket name to be lower case
 }
コード例 #4
0
 public static String getSecret() {
   Configuration config = Configuration.getInstance();
   return config.getProperty("secretKey");
 }
コード例 #5
0
 public static String getKey() {
   Configuration config = Configuration.getInstance();
   return config.getProperty("accessKey");
 }