Package org.jboss.resteasy.spi

Examples of org.jboss.resteasy.spi.ResteasyDeployment


      tjws.start();
   }

   public static ResteasyDeployment start(String bindPath, SecurityDomain domain) throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setSecurityEnabled(true);
      return start(bindPath, domain, deployment);
   }
View Full Code Here


    * @param mapping resteasy.servlet.mapping.prefix
    * @return
    */
   public DeploymentInfo undertowDeployment(Class<? extends Application> application, String mapping)
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setApplicationClass(application.getName());
      DeploymentInfo di = undertowDeployment(deployment, mapping);
      di.setClassLoader(application.getClassLoader());
      return di;
   }
View Full Code Here

    */
   public UndertowJaxrsServer deploy(Class<? extends Application> application, String contextPath)
   {
      if (contextPath == null) contextPath = "/";
      if (!contextPath.startsWith("/")) contextPath = "/" + contextPath;
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setApplicationClass(application.getName());
      DeploymentInfo di = undertowDeployment(deployment);
      di.setClassLoader(application.getClassLoader());
      di.setContextPath(contextPath);
      di.setDeploymentName("Resteasy" + contextPath);
      return deploy(di);
View Full Code Here

    */
   public UndertowJaxrsServer deploy(Application application, String contextPath)
   {
      if (contextPath == null) contextPath = "/";
      if (!contextPath.startsWith("/")) contextPath = "/" + contextPath;
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setApplication(application);
      DeploymentInfo di = undertowDeployment(deployment);
      di.setClassLoader(application.getClass().getClassLoader());
      di.setContextPath(contextPath);
      di.setDeploymentName("Resteasy" + contextPath);
      return deploy(di);
View Full Code Here

      return start(bindPath, domain, null, null);
   }
  
   public static ResteasyDeployment start(String bindPath, SecurityDomain domain, Hashtable<String,String> initParams, Hashtable<String,String> contextParams) throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setSecurityEnabled(true);
      return start(bindPath, domain, deployment, initParams, contextParams);
   }
View Full Code Here

    @Before
    public void init() {
        this.port = (int)((new Random().nextDouble() * 4000) + 1000);
        ResteasyCdiExtension cdiExtension = CDI.current().select(ResteasyCdiExtension.class).get();
        CdiNettyJaxrsServer netty = new CdiNettyJaxrsServer();
        ResteasyDeployment rd = new ResteasyDeployment();
        rd.setActualResourceClasses(cdiExtension.getResources());
        rd.setInjectorFactoryClass(CdiInjectorFactory.class.getName());
        rd.getActualProviderClasses().addAll(cdiExtension.getProviders());
        netty.setDeployment(rd);
        netty.setPort(port);
        netty.setRootResourcePath("/api");
        netty.start();
        this.server = netty;
View Full Code Here

      netty.start();
   }

   public static ResteasyDeployment start(String bindPath, SecurityDomain domain) throws Exception
   {
      ResteasyDeployment deployment = new ResteasyDeployment();
      deployment.setSecurityEnabled(true);
      return start(bindPath, domain, deployment);
   }
View Full Code Here

   }

   @BeforeClass
   public static void before() throws Exception
   {
      deployment = new ResteasyDeployment();
      deployment.setSecurityEnabled(true);
      deployment.setApplicationClass(SApp.class.getName());

      EmbeddedContainer.start(deployment);
      SkeletonKeyApplication app = ((SApp)deployment.getApplication()).app;
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

   }

   //@Test
   public void testInheritance() throws Exception
   {
      ResteasyDeployment dep = deployment;
      ClientRequest request = new ClientRequest(generateURL("/datacenters/1"));
      ClientResponse res = request.get();
      Assert.assertEquals(200, res.getStatus());
      DataCenter dc = (DataCenter) res.getEntity(DataCenter.class);
      Assert.assertEquals(dc.getName(), "Bill");
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.