Examples of ReaderInterceptor


Examples of javax.ws.rs.ext.ReaderInterceptor

    @Override
    public Object proceed() throws IOException {
        if (readers == null || readers.isEmpty()) {
            return null;
        }
        ReaderInterceptor next = readers.remove(0);
        return next.aroundReadFrom(this);
    }
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                      parameterType,
                                                      parameterAnnotations,
                                                      mediaType,
                                                      m);
        if (mr != null) {
            ReaderInterceptor mbrReader = new ReaderInterceptorMBR(mr, m.getExchange().getInMessage());
           
            int size = readerInterceptors.size();
            List<ReaderInterceptor> interceptors = null;
            if (size > 0) {
                interceptors = new ArrayList<ReaderInterceptor>(size + 1);
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                   MediaType mediaType,
                                                   Message m) throws IOException, WebApplicationException {
       
        // Verbose but avoids an extra context instantiation for the typical path
        if (readers.size() > 1) {
            ReaderInterceptor first = readers.remove(0);
            ReaderInterceptorContext context = new ReaderInterceptorContextImpl(targetTypeClass,
                                                                            parameterType,
                                                                            parameterAnnotations,
                                                                            is,
                                                                            m,
                                                                            readers);
           
            return first.aroundReadFrom(context);
        } else {
            MessageBodyReader<?> provider = ((ReaderInterceptorMBR)readers.get(0)).getMBR();
            @SuppressWarnings("rawtypes")
            Class cls = (Class)targetTypeClass;
            return provider.readFrom(
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                      parameterAnnotations,
                                                      mediaType,
                                                      m);
        int size = readerInterceptors.size();
        if (mr != null || size > 0) {
            ReaderInterceptor mbrReader = new ReaderInterceptorMBR(mr, m.getExchange().getInMessage());
           
            List<ReaderInterceptor> interceptors = null;
            if (size > 0) {
                interceptors = new ArrayList<ReaderInterceptor>(size + 1);
                List<ProviderInfo<ReaderInterceptor>> readers =
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                   MediaType mediaType,
                                                   Message m) throws IOException, WebApplicationException {
       
        // Verbose but avoids an extra context instantiation for the typical path
        if (readers.size() > 1) {
            ReaderInterceptor first = readers.remove(0);
            ReaderInterceptorContext context = new ReaderInterceptorContextImpl(targetTypeClass,
                                                                            parameterType,
                                                                            parameterAnnotations,
                                                                            is,
                                                                            m,
                                                                            readers);
           
            return first.aroundReadFrom(context);
        } else {
            MessageBodyReader<?> provider = ((ReaderInterceptorMBR)readers.get(0)).getMBR();
            @SuppressWarnings("rawtypes")
            Class cls = (Class)targetTypeClass;
            return provider.readFrom(
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                      parameterType,
                                                      parameterAnnotations,
                                                      mediaType,
                                                      m);
        if (mr != null) {
            ReaderInterceptor mbrReader = new ReaderInterceptorMBR(mr, m.getExchange().getInMessage());
           
            int size = readerInterceptors.size();
            List<ReaderInterceptor> interceptors = null;
            if (size > 0) {
                interceptors = new ArrayList<ReaderInterceptor>(size + 1);
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                   MediaType mediaType,
                                                   Message m) throws IOException, WebApplicationException {
       
        // Verbose but avoids an extra context instantiation for the typical path
        if (readers.size() > 1) {
            ReaderInterceptor first = readers.remove(0);
            ReaderInterceptorContext context = new ReaderInterceptorContextImpl(targetTypeClass,
                                                                            parameterType,
                                                                            parameterAnnotations,
                                                                            mediaType,
                                                                            is,
                                                                            m,
                                                                            readers);
           
            return first.aroundReadFrom(context);
        } else {
            MessageBodyReader<?> provider = ((ReaderInterceptorMBR)readers.get(0)).getMBR();
            @SuppressWarnings("rawtypes")
            Class cls = (Class)targetTypeClass;
            return provider.readFrom(
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                      parameterType,
                                                      parameterAnnotations,
                                                      mediaType,
                                                      m);
        if (mr != null) {
            ReaderInterceptor mbrReader = new ReaderInterceptorMBR(mr, m.getExchange().getInMessage());
           
            int size = readerInterceptors.size();
            List<ReaderInterceptor> interceptors = null;
            if (size > 0) {
                interceptors = new ArrayList<ReaderInterceptor>(size + 1);
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                   MediaType mediaType,
                                                   Message m) throws IOException, WebApplicationException {
       
        // Verbose but avoids an extra context instantiation for the typical path
        if (readers.size() > 1) {
            ReaderInterceptor first = readers.remove(0);
            ReaderInterceptorContext context = new ReaderInterceptorContextImpl(targetTypeClass,
                                                                            parameterType,
                                                                            parameterAnnotations,
                                                                            mediaType,
                                                                            is,
                                                                            m,
                                                                            readers);
           
            return first.aroundReadFrom(context);
        } else {
            MessageBodyReader<?> provider = ((ReaderInterceptorMBR)readers.get(0)).getMBR();
            @SuppressWarnings("rawtypes")
            Class cls = (Class)targetTypeClass;
            return provider.readFrom(
View Full Code Here

Examples of javax.ws.rs.ext.ReaderInterceptor

                                                   MediaType mediaType,
                                                   Message m) throws IOException, WebApplicationException {
       
        // Verbose but avoids an extra context instantiation for the typical path
        if (readers.size() > 1) {
            ReaderInterceptor first = readers.remove(0);
            ReaderInterceptorContext context = new ReaderInterceptorContextImpl(targetTypeClass,
                                                                            parameterType,
                                                                            parameterAnnotations,
                                                                            mediaType,
                                                                            is,
                                                                            m,
                                                                            readers);
           
            return first.aroundReadFrom(context);
        } else {
            MessageBodyReader<?> provider = ((ReaderInterceptorMBR)readers.get(0)).getMBR();
            @SuppressWarnings("rawtypes")
            Class cls = (Class)targetTypeClass;
            return provider.readFrom(
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.