当前位置: 首页>>代码示例>>Java>>正文


Java ResteasyDeployment.start方法代码示例

本文整理汇总了Java中org.jboss.resteasy.spi.ResteasyDeployment.start方法的典型用法代码示例。如果您正苦于以下问题:Java ResteasyDeployment.start方法的具体用法?Java ResteasyDeployment.start怎么用?Java ResteasyDeployment.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.resteasy.spi.ResteasyDeployment的用法示例。


在下文中一共展示了ResteasyDeployment.start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: testEngineWithInjectedClientPost2

import org.jboss.resteasy.spi.ResteasyDeployment; //导入方法依赖的package包/类
@Test
public void testEngineWithInjectedClientPost2() {

    final ResteasyDeployment deployment = new ResteasyDeployment();
    deployment.start();
    final ResteasyProviderFactory providerFactory = deployment.getProviderFactory();
    final HttpClient httpClient = Vertx.vertx().createHttpClient(httpClientOptions);
    final Client client = new ResteasyClientBuilder()
        .providerFactory(providerFactory)
        .httpEngine(new VertxClientEngine(httpClient))
        .register(GsonMessageBodyHandler.class)
        .build();
    final Form xform = new Form();
    xform.param("userName", "ca1\\\\meowmix");
    xform.param("password", "mingnamulan");
    xform.param("state", "authenticate");
    xform.param("style", "xml");
    xform.param("xsl", "none");

    final Response response = client.target("https://httpbin.org/post").request(MediaType.APPLICATION_JSON)
        .post(Entity.form(xform), Response.class);
    assertFalse(response.getStringHeaders().isEmpty());
    System.out.println(response.getStringHeaders());
    assertFalse(response.getHeaders().isEmpty());
    assertEquals(MediaType.APPLICATION_JSON_TYPE, response.getMediaType());
    assertTrue(response.hasEntity());
    final JsonObject arsString = response.readEntity(JsonObject.class);
    assertEquals("xml", arsString.getAsJsonObject("form").get("style").getAsString());
}
 
开发者ID:trajano,项目名称:app-ms,代码行数:30,代码来源:SpringJaxrsHandlerTest.java

示例2: before

import org.jboss.resteasy.spi.ResteasyDeployment; //导入方法依赖的package包/类
@Override
protected final void before() throws Throwable {
  deployment = new ResteasyDeployment();
  deployment.getDefaultContextObjects().put(SecurityContext.class, new DummySecurityContext());
  configureDeployment(deployment);

  deployment.start();

  ResteasyClientBuilder builder =
      new ResteasyClientBuilder()
          .httpEngine(new InProcessClientHttpEngine(deployment.getDispatcher(), baseUri));
  configureClient(builder);
  client = builder.build();
}
 
开发者ID:tbroyer,项目名称:jaxrs-utils,代码行数:15,代码来源:InProcessResteasy.java

示例3: createDeployment

import org.jboss.resteasy.spi.ResteasyDeployment; //导入方法依赖的package包/类
protected NettyBootstrap  createDeployment(ResteasyDeployment rd){
    if(rd == null){
        deployment = new ResteasyDeployment();
    }else{
        deployment = rd;
    }
    deployment.start();
    return this;
}
 
开发者ID:buzzxu,项目名称:resteasy-netty-guice,代码行数:10,代码来源:NettyBootstrap.java


注:本文中的org.jboss.resteasy.spi.ResteasyDeployment.start方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。