Package org.jboss.resteasy.core

Examples of org.jboss.resteasy.core.ResourceLocatorInvoker


   public void testLocatorOptions() throws URISyntaxException
   {
      ResourceMethodRegistry registry = new ResourceMethodRegistry(ResteasyProviderFactory
              .getInstance());
      registry.addPerRequestResource(Resource2.class);
      ResourceLocatorInvoker invoker = (ResourceLocatorInvoker)registry.getResourceInvoker(MockHttpRequest.options("/resource/sub"));
      Assert.assertNotNull(invoker);
      Assert.assertEquals(invoker.getMethod().getName(), "locator");
   }
View Full Code Here


   public void testLocator3() throws URISyntaxException
   {
      ResourceMethodRegistry registry = new ResourceMethodRegistry(ResteasyProviderFactory
              .getInstance());
      registry.addPerRequestResource(Locator3.class);
      ResourceLocatorInvoker invoker = (ResourceLocatorInvoker)registry.getResourceInvoker(MockHttpRequest.get("/locator/responseok/responseok"));
      Assert.assertNotNull(invoker);
      Assert.assertEquals(invoker.getMethod().getName(), "responseOk");
   }
View Full Code Here

               }

            }
            else
            {
               ResourceLocatorInvoker rl = (ResourceLocatorInvoker) invoker;
               SubresourceLocator locator = new SubresourceLocator();
               locator.setClazz(rl.getMethod().getDeclaringClass().getName());
               locator.setMethod(rl.getMethod().getName());
               entry.setLocator(locator);
            }

         }
View Full Code Here

        if (invoker instanceof ResourceMethodInvoker)
        {
          methods.add(new MethodMetaData(this, (ResourceMethodInvoker) invoker));
        } else if(invoker instanceof ResourceLocatorInvoker)
        {
          ResourceLocatorInvoker locator = (ResourceLocatorInvoker) invoker;
          Method method = locator.getMethod();
          Class<?> locatorType = method.getReturnType();
          Class<?>[] locatorResourceTypes = GetRestful.getSubResourceClasses(locatorType);
          for (Class<?> locatorResourceType : locatorResourceTypes)
          {
             if (locatorResourceType == null)
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.core.ResourceLocatorInvoker

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.