Ejemplo n.º 1
0
 @Override
 public LocationConstraintHandler setContext(HttpRequest request) {
   super.setContext(request);
   setBucket(
       GeneratedHttpRequest.class.cast(getRequest()).getInvocation().getArgs().get(0).toString());
   return this;
 }
Ejemplo n.º 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);
 }
 private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
   handler.setContext(request);
 }
 private void addDefaultRegionToHandler(ParseSax.HandlerWithResult<?> handler) {
   GeneratedHttpRequest<?> request = createMock(GeneratedHttpRequest.class);
   expect(request.getArgs()).andReturn(new Object[] {null}).atLeastOnce();
   replay(request);
   handler.setContext(request);
 }