Package org.jboss.resteasy.client.jaxrs

Examples of org.jboss.resteasy.client.jaxrs.ResteasyWebTarget.proxy()


    Client client = ClientBuilder.newBuilder().build();
    WebTarget target = client.target( dataStore.getDatabaseIdentifier().getDatabaseUri() );
    ResteasyWebTarget rtarget = (ResteasyWebTarget) target;

    return rtarget.proxy( DatabaseTestClient.class );
  }

  @Override
  public GlobalContext<?, ?> configureDatastore(OgmConfiguration configuration) {
    return configuration.configureOptionsFor( CouchDB.class );
View Full Code Here


   public SkeletonKeyAdminClient admin()
   {
      ResteasyWebTarget clone = admin.clone();
      Mappers.registerContextResolver(clone);
      authenticateTarget("Skeleton Key", clone);
      return clone.proxy(SkeletonKeyAdminClient.class);
   }

}
View Full Code Here

     @Test
     public void testEcho()
     {
       ResteasyClient client = new ResteasyClientBuilder().build();
       ResteasyWebTarget target = client.target("http://localhost:9095");
       HelloString proxy = target.proxy(HelloString.class);
       String hello = proxy.sayHi("hello");
       Assert.assertEquals("hello", hello);
     }

    
View Full Code Here

  @Test(expected = RuntimeException.class)
  public void testOldBehaviorContinues() throws Exception
  {
      ResteasyWebTarget target = client.target(TestPortProvider.generateURL("/foo"));
    target.proxy(Foo.class);
  }
 
  @Test
  public void testDefaultValues() throws Exception
  {
View Full Code Here

   @Test
  public void testSubresourceProxy() throws Exception
  {
      ResteasyWebTarget target = client.target(TestPortProvider.generateURL("/gulliverstravels"));
    Book book = target.proxy(Book.class);
   
    Assert.assertEquals("Gulliver's Travels", book.getTitle());
   
    Chapter ch1 = book.getChapter(1);
    Assert.assertEquals("Chapter 1", ch1.getTitle());
View Full Code Here

   @Test
   public void testProxy691() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      MyFormProxy proxy = target.proxy(MyFormProxy.class);
      proxy.post(null);
      client.close();
   }

   @Test
View Full Code Here

   @Test
   public void testProxy() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      FormClientProxy proxy = target.proxy(FormClientProxy.class);
      ClientForm form = new ClientForm();
      form.setBooleanValue(true);
      form.setName("This is My Name");
      form.setDoubleValue(123.45);
      form.setLongValue(566780L);
View Full Code Here

      count = 0;
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      target.register(BrowserCacheFeature.class);

      MyProxy proxy = target.proxy(MyProxy.class);
      String rtn = null;
      rtn = proxy.get();
      Assert.assertEquals("hello world" + 1, rtn);
      Assert.assertEquals(1, count);
      rtn = proxy.get();
View Full Code Here

      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      target.register(BrowserCacheFeature.class);
      LightweightBrowserCache cache = (LightweightBrowserCache)target.getConfiguration().getProperty(BrowserCache.class.getName());
      cache.setMaxBytes(20);
      MyProxy proxy = target.proxy(MyProxy.class);


      count = 0;

      String rtn = proxy.getCacheit("1");
View Full Code Here

   @Test
   public void testProxy() throws Exception
   {
      ResteasyClient client = new ResteasyClientBuilder().build();
      ResteasyWebTarget target = client.target(generateBaseUrl());
      IGZIP proxy = target.proxy(IGZIP.class);
      Assert.assertEquals("HELLO WORLD", proxy.getText());
      Assert.assertEquals("HELLO WORLD", proxy.getGzipText());

      // resteasy-651
      try
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.