Package com.sun.jersey.api.core

Examples of com.sun.jersey.api.core.TraceInformation


        if (wa.getFeaturesAndProperties().getFeature(ResourceConfig.FEATURE_TRACE_PER_REQUEST) &&
                !getRequestHeaders().containsKey("X-Jersey-Trace-Accept"))
            return;

        TraceInformation ti = (TraceInformation) getProperties().
                get(TraceInformation.class.getName());
        ti.trace(message);
    }
View Full Code Here


                request.getInputStream());
    }

    private void traceOnException(final ContainerRequest cRequest, final HttpServletResponse response) {
        if (cRequest.isTracingEnabled()) {
            final TraceInformation ti = (TraceInformation) cRequest.getProperties().
                    get(TraceInformation.class.getName());

            ti.addTraceHeaders(new TraceInformation.TraceHeaderListener() {
                public void onHeader(String name, String value) {
                    response.addHeader(name, value);
                }
            });
        }
View Full Code Here

        }
        responseWriter.finish();
    }

    private void configureTrace(final ContainerResponseWriter crw) {
        final TraceInformation ti = (TraceInformation)request.getProperties().
                get(TraceInformation.class.getName());
        setContainerResponseWriter(new ContainerResponseWriter() {
            public OutputStream writeStatusAndHeaders(long contentLength,
                                                      ContainerResponse response) throws IOException {
                ti.addTraceHeaders();
                return crw.writeStatusAndHeaders(contentLength, response);
            }

            public void finish() throws IOException {
                crw.finish();
View Full Code Here

        this.response = response;
        this.responseFilters = Collections.EMPTY_LIST;

        if (isTracingEnabled()) {
            getProperties().put(TraceInformation.class.getName(),
                    new TraceInformation(this));
        }
    }
View Full Code Here

        }
        responseWriter.finish();
    }

    private void configureTrace(final ContainerResponseWriter crw) {
        final TraceInformation ti = (TraceInformation)request.getProperties().
                get(TraceInformation.class.getName());
        setContainerResponseWriter(new ContainerResponseWriter() {
            public OutputStream writeStatusAndHeaders(long contentLength,
                    ContainerResponse response) throws IOException {
                ti.addTraceHeaders();
                return crw.writeStatusAndHeaders(contentLength, response);
            }

            public void finish() throws IOException {
                crw.finish();
View Full Code Here

                request.getInputStream());
    }

    private void traceOnException(final ContainerRequest cRequest, final HttpServletResponse response) {
        if (cRequest.isTracingEnabled()) {
            final TraceInformation ti = (TraceInformation) cRequest.getProperties().
                    get(TraceInformation.class.getName());

            ti.addTraceHeaders(new TraceInformation.TraceHeaderListener() {
                @Override
        public void onHeader(String name, String value) {
                    response.addHeader(name, value);
                }
            });
View Full Code Here

        if (wa.getFeaturesAndProperties().getFeature(ResourceConfig.FEATURE_TRACE_PER_REQUEST) &&
                !getRequestHeaders().containsKey("X-Jersey-Trace-Accept"))
            return;

        TraceInformation ti = (TraceInformation) getProperties().
                get(TraceInformation.class.getName());
        ti.trace(message);
    }
View Full Code Here

                request.getInputStream());
    }

    private void traceOnException(final ContainerRequest cRequest, final HttpServletResponse response) {
        if (cRequest.isTracingEnabled()) {
            final TraceInformation ti = (TraceInformation) cRequest.getProperties().
                    get(TraceInformation.class.getName());

            ti.addTraceHeaders(new TraceInformation.TraceHeaderListener() {
                public void onHeader(String name, String value) {
                    response.addHeader(name, value);
                }
            });
        }
View Full Code Here

        if (wa.getFeaturesAndProperties().getFeature(ResourceConfig.FEATURE_TRACE_PER_REQUEST) &&
                !getRequestHeaders().containsKey("X-Jersey-Trace-Accept"))
            return;

        TraceInformation ti = (TraceInformation) getProperties().
                get(TraceInformation.class.getName());
        ti.trace(message);
    }
View Full Code Here

        this.response = response;
        this.responseFilters = Collections.EMPTY_LIST;

        if (isTracingEnabled()) {
            getProperties().put(TraceInformation.class.getName(),
                    new TraceInformation(this));
        }
    }
View Full Code Here

TOP

Related Classes of com.sun.jersey.api.core.TraceInformation

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.