|
|
@ -4,6 +4,7 @@ package verteiltesysteme.aws; |
|
|
|
import javax.ws.rs.*; |
|
|
|
import javax.ws.rs.core.MediaType; |
|
|
|
|
|
|
|
import com.amazonaws.regions.Regions; |
|
|
|
import com.amazonaws.services.s3.AmazonS3; |
|
|
|
import com.amazonaws.services.s3.AmazonS3ClientBuilder; |
|
|
|
|
|
|
@ -23,6 +24,7 @@ public class TCPTimeCounterRESTService { |
|
|
|
private boolean setCounter(Long counter) { |
|
|
|
// Verbindung zu S3 |
|
|
|
AmazonS3 s3Client = AmazonS3ClientBuilder.defaultClient(); |
|
|
|
s3Client.setRegion(com.amazonaws.regions.Region.getRegion(Regions.EU_CENTRAL_1)); |
|
|
|
s3Client.putObject(bucketName, bucketRegion, new Long(counter).toString()); |
|
|
|
return true; |
|
|
|
} |
|
|
|