コード例 #1
0
 @Override
 public LocationConstraintHandler setContext(HttpRequest request) {
   super.setContext(request);
   setBucket(
       GeneratedHttpRequest.class.cast(getRequest()).getInvocation().getArgs().get(0).toString());
   return this;
 }
コード例 #2
0
 private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
   GeneratedHttpRequest<?> request = createMock(GeneratedHttpRequest.class);
   expect(request.getArgs()).andReturn(ImmutableList.<Object>of());
   replay(request);
   handler.setContext(request);
 }
コード例 #3
0
 private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
   handler.setContext(request);
 }
コード例 #4
0
 private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
   GeneratedHttpRequest<?> request = createMock(GeneratedHttpRequest.class);
   expect(request.getArgs()).andReturn(new Object[] {null}).atLeastOnce();
   replay(request);
   handler.setContext(request);
 }