Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.ResteasyDeployment


   }

   @Before
   public void startServer() throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      Map<String, String> mediaTypeMappings = new HashMap<String, String>();
      mediaTypeMappings.put("xml", "application/xml");
      mediaTypeMappings.put("json", "application/json");
      deployment.setMediaTypeMappings(mediaTypeMappings);
      EmbeddedContainer.start(deployment);

      deployment.getRegistry().addPerRequestResource(TestResource.class);
   }
View Full Code Here


    * DefaultPlainText gets passed over.
    */
   @Test
   public void test1New() throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setRegisterBuiltin(false);
      ResteasyProviderFactory factory = new ResteasyProviderFactory();
      factory.registerProviderInstance(new DefaultTextPlain());
      factory.registerProviderInstance(new TestReaderWriter());
      factory.registerProviderInstance(new TestReaderWriter());
      deployment.setProviderFactory(factory);
      EmbeddedContainer.start(deployment);
      dispatcher = deployment.getDispatcher();     
      dispatcher.getRegistry().addPerRequestResource(SimpleResource.class);

      try
      {
         ClientRequest request = new ClientRequest(generateURL("/string"));
View Full Code Here

   }

   @BeforeClass
   public static void before() throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setAsyncJobServiceEnabled(true);
      EmbeddedContainer.start(deployment);

      dispatcher = (AsynchronousDispatcher) deployment.getDispatcher();
      dispatcher.getRegistry().addPerRequestResource(MyResource.class);
   }
View Full Code Here

   AsynchronousDispatcher dispatcher;

   @Autowired
   public void setServer(TJWSEmbeddedSpringMVCServerBean server)
   {
      ResteasyDeployment deployment = (ResteasyDeployment)server.getServer()
            .getApplicationContext().getBeansOfType(
                  ResteasyDeployment.class).values().iterator().next();
      dispatcher = (AsynchronousDispatcher)deployment.getDispatcher();
   }
View Full Code Here

   }

   @BeforeClass
   public static void before() throws Exception
   {
      deployment = new ResteasyDeployment();
      deployment.setApplicationClass(SApp.class.getName());
      EmbeddedContainer.start(deployment);
   }
View Full Code Here

      }
   }

   private static void startDeployment() throws Exception
   {
      deployment = new ResteasyDeployment();
      deployment.setSecurityEnabled(true);
      deployment.setApplicationClass(SApp.class.getName());
      ResteasyProviderFactory factory = new ResteasyProviderFactory();
      deployment.setProviderFactory(factory);
      factory.property(SkeletonKeyApplication.SKELETON_KEY_INFINISPAN_CONFIG_FILE, "cache.xml");
View Full Code Here

   }

   @BeforeClass
   public static void before() throws Exception
   {
      deployment = new ResteasyDeployment();
      deployment.setApplicationClass(SApp.class.getName());
      EmbeddedContainer.start(deployment);
   }
View Full Code Here

   }

   @BeforeClass
   public static void before() throws Exception
   {
      deployment = new ResteasyDeployment();
      deployment.setApplicationClass(SApp.class.getName());
      EmbeddedContainer.start(deployment);
   }
View Full Code Here

      deployment.getProviderFactory().registerProvider(FooReaderWriter.class);
   }
  
   public static void beforeFooAsynch(Class<?> resourceClass) throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setAsyncJobServiceEnabled(true);
      EmbeddedContainer.start(deployment);
      dispatcher = deployment.getDispatcher();
      dispatcher.getRegistry().addPerRequestResource(resourceClass);
      deployment.getProviderFactory().registerProvider(FooReaderWriter.class);
      deployment.getProviderFactory().registerProvider(FooReaderWriter.class);
   }
View Full Code Here

   private static String itemString;

   @BeforeClass
   public static void before() throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setAsyncJobServiceEnabled(true);
      EmbeddedContainer.start(deployment);

      System.out.println("hello");
      dispatcher = deployment.getDispatcher();
      dispatcher.getRegistry().addPerRequestResource(AsyncService.class);
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.spi.ResteasyDeployment

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.