Package org.jboss.resteasy.core

Examples of org.jboss.resteasy.core.SynchronousDispatcher


   protected Dispatcher dispatcher;
   protected URI baseUri;

   public InMemoryClientExecutor()
   {
      dispatcher = new SynchronousDispatcher(ResteasyProviderFactory.getInstance());
   }
View Full Code Here


         dispatcher = asyncDispatcher;
         asyncDispatcher.start();
      }
      else
      {
         SynchronousDispatcher dis = new SynchronousDispatcher(providerFactory);
         dis.getUnwrappedExceptions().addAll(unwrappedExceptions);
         dispatcher = dis;
      }
      registry = dispatcher.getRegistry();

View Full Code Here

   @Test
   public void validateTypeMappingsExistInSpring()
   {
      ApplicationContext ctx = new ClassPathXmlApplicationContext("spring-typemapping-test-server.xml");
      SynchronousDispatcher dispatcher = (SynchronousDispatcher) ctx.getBean("resteasy.dispatcher");
      Map<String, MediaType> mappings = dispatcher.getMediaTypeMappings();
      assertEquals(2, mappings.size());
      assertEquals("application/xml", mappings.get("xml").toString());
      assertEquals("application/json", mappings.get("json").toString());
   }
View Full Code Here

      providerFactory.registerProvider(StringTextStar.class);

      // use @Provider annotation to register a custom ValueInjector!!!
      providerFactory.registerProvider(MyInjectorFactoryImpl.class);

      return new SynchronousDispatcher(providerFactory);
   }
View Full Code Here

         dispatcher = asyncDispatcher;
         asyncDispatcher.start();
      }
      else
      {
         dispatcher = new SynchronousDispatcher(providerFactory);
      }
      registry = dispatcher.getRegistry();

      // Interceptor preferences should come before provider registration or builtin.
View Full Code Here

         dispatcher = asyncDispatcher;
         asyncDispatcher.start();
      }
      else
      {
         SynchronousDispatcher dis = new SynchronousDispatcher(providerFactory);
         dis.getUnwrappedExceptions().addAll(unwrappedExceptions);
         dispatcher = dis;
      }
      registry = dispatcher.getRegistry();

      dispatcher.getDefaultContextObjects().putAll(defaultContextObjects);
View Full Code Here

   protected Dispatcher dispatcher;
   protected URI baseUri;

   public InMemoryClientExecutor()
   {
      dispatcher = new SynchronousDispatcher(ResteasyProviderFactory.getInstance());
   }
View Full Code Here

      return new SeamResteasyProviderFactory();
   }

   protected Dispatcher createDispatcher(SeamResteasyProviderFactory providerFactory)
   {
      return new SynchronousDispatcher(providerFactory);
   }
View Full Code Here

      }

      dispatcher = (Dispatcher) servletConfig.getServletContext().getAttribute(Dispatcher.class.getName());
      if (dispatcher == null)
      {
         dispatcher = new SynchronousDispatcher(providerFactory);
         servletConfig.getServletContext().setAttribute(Dispatcher.class.getName(), dispatcher);
         servletConfig.getServletContext().setAttribute(Registry.class.getName(), dispatcher.getRegistry());
      }
      servletMappingPrefix = servletConfig.getServletContext().getInitParameter("resteasy.servlet.mapping.prefix");
      if (servletMappingPrefix == null) servletMappingPrefix = "";
View Full Code Here

public class MockDispatcherFactory
{

   public static Dispatcher createDispatcher()
   {
      Dispatcher dispatcher = new SynchronousDispatcher(new ResteasyProviderFactory());
      ResteasyProviderFactory.setInstance(dispatcher.getProviderFactory());
      RegisterBuiltin.register(dispatcher.getProviderFactory());
      return dispatcher;
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.core.SynchronousDispatcher

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.