Package org.jboss.resteasy.plugins.server.resourcefactory

Examples of org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory


   @Test
   public void testSubSubresource() throws Exception
   {
      Dispatcher dispatcher = MockDispatcherFactory.createDispatcher();

      POJOResourceFactory noDefaults = new POJOResourceFactory(LocatingResource.class);
      dispatcher.getRegistry().addResourceFactory(noDefaults);

      {
         MockHttpRequest request = MockHttpRequest.get("/subresource/subresource/subresource/basic");
         MockHttpResponse response = new MockHttpResponse();
View Full Code Here


   @Test
   public void testContextParam() throws Exception
   {
      Dispatcher dispatcher = MockDispatcherFactory.createDispatcher();

      POJOResourceFactory noDefaults = new POJOResourceFactory(LocatingResource.class);
      dispatcher.getRegistry().addResourceFactory(noDefaults);

      {

         System.out.println("Expect to see WARN about not injecting in subresources");
View Full Code Here

   }

   @Test
   public void testNoDefaultsResource() throws Exception
   {
      POJOResourceFactory noDefaults = new POJOResourceFactory(ResourceWithInterface.class);
      dispatcher.getRegistry().addResourceFactory(noDefaults);

      SimpleClient client = ProxyFactory.create(SimpleClient.class, generateBaseUrl());

      Assert.assertEquals("basic", client.getBasic());
View Full Code Here

   }

   @Test
   public void testNoDefaultsResource() throws Exception
   {
      POJOResourceFactory noDefaults = new POJOResourceFactory(BookStore.class);
      dispatcher.getRegistry().addResourceFactory(noDefaults);

      HttpClient httpClient = new HttpClient();
      ApacheHttpClientExecutor executor = new ApacheHttpClientExecutor(httpClient);
      BookStoreClient client = ProxyFactory.create(BookStoreClient.class, generateBaseUrl(),
View Full Code Here

    this.resourceType = resourceType;
  }

  @Before
  public void before(){
    POJOResourceFactory noDefaults = new POJOResourceFactory(resourceType);
    dispatcher.getRegistry().addResourceFactory(noDefaults);
    httpClient = new HttpClient();
    httpClient.getState().setAuthenticationPreemptive(true);
    ApacheHttpClientExecutor executor = new ApacheHttpClientExecutor(httpClient);
    url = generateBaseUrl();
View Full Code Here

      this.providerFactory = providerFactory;
   }

   public void addPerRequestResource(Class clazz, String basePath)
   {
      addResourceFactory(new POJOResourceFactory(clazz), basePath);

   }
View Full Code Here

    *
    * @param clazz
    */
   public void addPerRequestResource(Class clazz)
   {
      addResourceFactory(new POJOResourceFactory(clazz));
   }
View Full Code Here

      this.providerFactory = providerFactory;
   }

   public void addPerRequestResource(Class clazz, String basePath)
   {
      addResourceFactory(new POJOResourceFactory(clazz), basePath);

   }
View Full Code Here

    *
    * @param clazz
    */
   public void addPerRequestResource(Class clazz)
   {
      addResourceFactory(new POJOResourceFactory(clazz));
   }
View Full Code Here

   }

   protected void registerPlainResource(Class plainResourceClass)
   {
      log.debug("registering resource, event-scoped JAX-RS lifecycle: {0}", plainResourceClass.getName());
      getDispatcher().getRegistry().addResourceFactory(new POJOResourceFactory(plainResourceClass));
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.plugins.server.resourcefactory.POJOResourceFactory

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.