@Override
 public Object createResource(
     HttpRequest request, HttpResponse response, ResteasyProviderFactory factory) {
   Context ctx = Vertx.currentContext();
   if (ctx != null) {
     Object resource = ctx.get(id);
     if (resource == null) {
       resource = delegate.createResource(request, response, factory);
       ctx.put(id, resource);
     }
     return resource;
   } else {
     throw new IllegalStateException();
   }
 }
Beispiel #2
0
 public BuiltResponse invoke(HttpRequest request, HttpResponse response) {
   Object target = resource.createResource(request, response, resourceMethodProviderFactory);
   return invoke(request, response, target);
 }
 public ServerResponse invoke(HttpRequest request, HttpResponse response) {
   Object target = resource.createResource(request, response, injector);
   return invoke(request, response, target);
 }