本文整理了Java中com.amazonaws.http.AmazonHttpClient.parseClockSkewOffset()
方法的一些代码示例,展示了AmazonHttpClient.parseClockSkewOffset()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AmazonHttpClient.parseClockSkewOffset()
方法的具体详情如下:
包路径:com.amazonaws.http.AmazonHttpClient
类名称:AmazonHttpClient
方法名:parseClockSkewOffset
暂无
代码示例来源:origin: aws-amplify/aws-sdk-android
final int timeOffset = parseClockSkewOffset(httpResponse, ase);
SDKGlobalConfiguration.setGlobalTimeOffset(timeOffset);
代码示例来源:origin: aws-amplify/aws-sdk-android
@Test
public void testClockskewOffsetWithDateInBodyOfException() {
HttpResponse httpResponse = new HttpResponse.Builder().statusText("TestResponse")
.statusCode(400).build();
AmazonServiceException ase = new AmazonServiceException("(20041106T084937Z - 15)");
// assert date is > 10 years
int offset = client.parseClockSkewOffset(httpResponse, ase);
assertTrue(offset > 315400000);
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Test
public void testClockskewOffset() {
HttpResponse httpResponse = new HttpResponse.Builder().statusText("TestResponse")
.header("Date", "Sat, 06 Nov 2004 08:49:37 GMT")
.statusCode(400).build();
AmazonServiceException ase = new AmazonServiceException("ClockSkew");
// assert date is > 10 years
int offset = client.parseClockSkewOffset(httpResponse, ase);
assertTrue(offset > 315400000);
}
代码示例来源:origin: aws-amplify/aws-sdk-android
@Test
public void testClockskewOffsetWithBogusDateAsssumesOffsetIsZero() {
HttpResponse httpResponse = new HttpResponse.Builder().statusText("TestResponse")
.header("Date", "Sat, 064 Jann 20044 08:49:37 GMT")
.statusCode(400).build();
AmazonServiceException ase = new AmazonServiceException("ClockSkew");
// assert date is > 10 years
int offset = client.parseClockSkewOffset(httpResponse, ase);
assertEquals(offset, 0);
}
代码示例来源:origin: com.gluonhq/aws-java-sdk-core
final int timeOffset = parseClockSkewOffset(httpResponse, ase);
SDKGlobalConfiguration.setGlobalTimeOffset(timeOffset);
代码示例来源:origin: com.amazonaws/aws-android-sdk-core
final int timeOffset = parseClockSkewOffset(httpResponse, ase);
SDKGlobalConfiguration.setGlobalTimeOffset(timeOffset);
内容来源于网络,如有侵权,请联系作者删除!