Package org.jboss.resteasy.core.interception

Examples of org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl


              genericType, annotations, mediaType);
      if (writer == null)
         throw createWriterNotFound(genericType, mediaType);

      final Map<String, Object> attributes = new HashMap<String, Object>();
      MessageBodyWriterContextImpl messageBodyWriterContext = new MessageBodyWriterContextImpl(interceptors, writer, toOutput, type,
              genericType, annotations, mediaType, requestHeaders, outputStream)
      {
         @Override
         public Object getAttribute(String attribute)
         {
            return attributes.get(attribute);
         }

         @Override
         public void setAttribute(String name, Object value)
         {
            attributes.put(name, value);
         }

         @Override
         public void removeAttribute(String name)
         {
            attributes.remove(name);
         }

      };
      messageBodyWriterContext
              .proceed();
   }
View Full Code Here


      if (writer == null)
      {
         throw new RuntimeException("could not find writer for content-type "
                 + bodyContentType + " type: " + bodyType.getName());
      }
      new MessageBodyWriterContextImpl(getWriterInterceptors(), writer, body,
              bodyType, bodyGenericType, bodyAnnotations, bodyContentType,
              headers, outputStream).proceed();
   }
View Full Code Here

      if (writer == null)
      {
         throw new RuntimeException("could not find writer for content-type "
                 + bodyContentType + " type: " + bodyType.getName());
      }
      new MessageBodyWriterContextImpl(getWriterInterceptors(), writer, body,
              bodyType, bodyGenericType, bodyAnnotations, bodyContentType,
              headers, outputStream).proceed();
   }
View Full Code Here

                    contentType, response.getOutputHeaders(), response
                            .getOutputStream());
         }
         else
         {
            MessageBodyWriterContextImpl ctx = new MessageBodyWriterContextImpl(messageBodyWriterInterceptors, writer, ent, type, generic,
                    annotations, contentType, response.getOutputHeaders(), response.getOutputStream());
            ctx.proceed();
         }
      }
      catch (Exception ex)
      {
         if (ex instanceof WriterException)
View Full Code Here

   {
      MessageBodyWriter writer = factory.getMessageBodyWriter(type,
            genericType, annotations, mediaType);
      if (writer == null)
         throw createWriterNotFound(genericType, mediaType);
      new MessageBodyWriterContextImpl(interceptors, writer, toOutput, type,
            genericType, annotations, mediaType, requestHeaders, outputStream)
            .proceed();
   }
View Full Code Here

                 contentType, response.getOutputHeaders(), response
                         .getOutputStream());
      }
      else
      {
         MessageBodyWriterContextImpl ctx = new MessageBodyWriterContextImpl(messageBodyWriterInterceptors, writer, ent, type, generic,
                 annotations, contentType, response.getOutputHeaders(), response.getOutputStream());
         ctx.proceed();
      }
   }
View Full Code Here

      if (writer == null)
      {
         throw new RuntimeException("could not find writer for content-type "
                 + bodyContentType + " type: " + bodyType.getName());
      }
      new MessageBodyWriterContextImpl(getWriterInterceptors(), writer, body,
              bodyType, bodyGenericType, bodyAnnotations, bodyContentType,
              headers, outputStream).proceed();
   }
View Full Code Here

TOP

Related Classes of org.jboss.resteasy.core.interception.MessageBodyWriterContextImpl

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.