Examples of findCachedContext()


Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         throw new JAXBUnmarshalException("Unable to find JAXBContext for media type: " + mediaType);
      }

      try
      {
         JAXBContext ctx = finder.findCachedContext(Entry.class, mediaType, annotations);
         Entry entry = (Entry) ctx.createUnmarshaller().unmarshal(entityStream);
         if (entry.getContent() != null) entry.getContent().setFinder(finder);
         return entry;
      }
      catch (JAXBException e)
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         throw new JAXBUnmarshalException("Unable to find JAXBContext for media type: " + mediaType);
      }

      try
      {
         JAXBContext ctx = finder.findCachedContext(Feed.class, mediaType, annotations);
         Feed feed = (Feed) ctx.createUnmarshaller().unmarshal(entityStream);
         for (Entry entry : feed.getEntries())
         {
            if (entry.getContent() != null) entry.getContent().setFinder(finder);
         }
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

   public void testCache() throws Exception
   {
      {
         ContextResolver<JAXBContextFinder> resolver = getProviderFactory().getContextResolver(JAXBContextFinder.class, MediaType.APPLICATION_XML_TYPE);
         JAXBContextFinder finder = resolver.getContext(Child.class);
         JAXBContext ctx = finder.findCachedContext(Child.class, MediaType.APPLICATION_XML_TYPE, null);


         JAXBContext ctx2 = finder.findCachedContext(Child.class, MediaType.APPLICATION_XML_TYPE, null);

         Assert.assertTrue(ctx == ctx2);
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         ContextResolver<JAXBContextFinder> resolver = getProviderFactory().getContextResolver(JAXBContextFinder.class, MediaType.APPLICATION_XML_TYPE);
         JAXBContextFinder finder = resolver.getContext(Child.class);
         JAXBContext ctx = finder.findCachedContext(Child.class, MediaType.APPLICATION_XML_TYPE, null);


         JAXBContext ctx2 = finder.findCachedContext(Child.class, MediaType.APPLICATION_XML_TYPE, null);

         Assert.assertTrue(ctx == ctx2);
      }

      {
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

      }

      {
         ContextResolver<JAXBContextFinder> resolver = getProviderFactory().getContextResolver(JAXBContextFinder.class, MediaType.APPLICATION_JSON_TYPE);
         JAXBContextFinder finder = resolver.getContext(Child.class);
         JAXBContext ctx = finder.findCachedContext(Child.class, MediaType.APPLICATION_JSON_TYPE, null);


         JAXBContext ctx2 = finder.findCachedContext(Child.class, MediaType.APPLICATION_JSON_TYPE, null);

         Assert.assertTrue(ctx == ctx2);
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         ContextResolver<JAXBContextFinder> resolver = getProviderFactory().getContextResolver(JAXBContextFinder.class, MediaType.APPLICATION_JSON_TYPE);
         JAXBContextFinder finder = resolver.getContext(Child.class);
         JAXBContext ctx = finder.findCachedContext(Child.class, MediaType.APPLICATION_JSON_TYPE, null);


         JAXBContext ctx2 = finder.findCachedContext(Child.class, MediaType.APPLICATION_JSON_TYPE, null);

         Assert.assertTrue(ctx == ctx2);
      }
      {
         MediaType mediaType = new MediaType("application", "fastinfoset");
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

      }
      {
         MediaType mediaType = new MediaType("application", "fastinfoset");
         ContextResolver<JAXBContextFinder> resolver = getProviderFactory().getContextResolver(JAXBContextFinder.class, mediaType);
         JAXBContextFinder finder = resolver.getContext(Child.class);
         JAXBContext ctx = finder.findCachedContext(Child.class, mediaType, null);


         JAXBContext ctx2 = finder.findCachedContext(Child.class, mediaType, null);

         Assert.assertTrue(ctx == ctx2);
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         ContextResolver<JAXBContextFinder> resolver = getProviderFactory().getContextResolver(JAXBContextFinder.class, mediaType);
         JAXBContextFinder finder = resolver.getContext(Child.class);
         JAXBContext ctx = finder.findCachedContext(Child.class, mediaType, null);


         JAXBContext ctx2 = finder.findCachedContext(Child.class, mediaType, null);

         Assert.assertTrue(ctx == ctx2);
      }
   }
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         throw new JAXBUnmarshalException("Unable to find JAXBContext for media type: " + mediaType);
      }

      try
      {
         JAXBContext ctx = finder.findCachedContext(Feed.class, mediaType, annotations);
         Feed feed = (Feed) ctx.createUnmarshaller().unmarshal(entityStream);
         for (Entry entry : feed.getEntries())
         {
            if (entry.getContent() != null) entry.getContent().setFinder(finder);
         }
View Full Code Here

Examples of org.jboss.resteasy.plugins.providers.jaxb.JAXBContextFinder.findCachedContext()

         throw new JAXBUnmarshalException("Unable to find JAXBContext for media type: " + mediaType);
      }

      try
      {
         JAXBContext ctx = finder.findCachedContext(Entry.class, mediaType, annotations);
         Entry entry = (Entry) ctx.createUnmarshaller().unmarshal(entityStream);
         if (entry.getContent() != null) entry.getContent().setFinder(finder);
         entry.setFinder(finder);
         return entry;
      }
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.