Examples of TraceInformation


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

        }
    }

    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

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

        }
        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

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

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

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

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

Examples of org.jboss.marshalling.TraceInformation

            Collections.<Flag>emptySet());
      try {
         marshaller.objectToByteBuffer(cmd);
      } catch (NotSerializableException e) {
         log.info("Log exception for output format verification", e);
         TraceInformation inf = (TraceInformation) e.getCause();
         assert inf.toString().contains("in object java.lang.Object@");
         assert inf.toString().contains("in object org.infinispan.commands.write.PutKeyValueCommand@");
      }
   }
View Full Code Here

Examples of org.jboss.marshalling.TraceInformation

   public void testNonSerializable() throws Exception {
      try {
         marshaller.objectToByteBuffer(new Object());
      } catch (NotSerializableException e) {
         log.info("Log exception for output format verification", e);
         TraceInformation inf = (TraceInformation) e.getCause();
         assert inf.toString().contains("in object java.lang.Object@");
      }
   }
View Full Code Here

Examples of org.jboss.marshalling.TraceInformation

      byte[] bytes = marshaller.objectToByteBuffer(pojo);
      try {
         marshaller.objectFromByteBuffer(bytes);
      } catch (IOException e) {
         log.info("Log exception for output format verification", e);
         TraceInformation inf = (TraceInformation) e.getCause();
         assert inf.toString().contains("in object of type org.infinispan.marshall.VersionAwareMarshallerTest$PojoWhichFailsOnUnmarshalling");
      }

   }
View Full Code Here

Examples of org.jboss.marshalling.TraceInformation

      PutKeyValueCommand cmd = new PutKeyValueCommand("k", new Object(), false, null, 0, 0, Collections.<Flag>emptySet());
      try {
         marshaller.objectToByteBuffer(cmd);
      } catch (NotSerializableException e) {
         log.info("Log exception for output format verification", e);
         TraceInformation inf = (TraceInformation) e.getCause();
         assert inf.toString().contains("in object java.lang.Object@");
         assert inf.toString().contains("in object org.infinispan.commands.write.PutKeyValueCommand@");
      }
   }
View Full Code Here

Examples of org.jboss.marshalling.TraceInformation

   public void testNonSerializable() throws Exception {
      try {
         marshaller.objectToByteBuffer(new Object());
      } catch (NotSerializableException e) {
         log.info("Log exception for output format verification", e);
         TraceInformation inf = (TraceInformation) e.getCause();
         assert inf.toString().contains("in object java.lang.Object@");
      }
   }
View Full Code Here

Examples of org.jboss.marshalling.TraceInformation

      byte[] bytes = marshaller.objectToByteBuffer(pojo);
      try {
         marshaller.objectFromByteBuffer(bytes);
      } catch (IOException e) {
         log.info("Log exception for output format verification", e);
         TraceInformation inf = (TraceInformation) e.getCause();
         assert inf.toString().contains("in object of type org.infinispan.marshall.VersionAwareMarshallerTest$PojoWhichFailsOnUnmarshalling");
      }

   }
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.