/** * Injection constructor. * * @param requestContext request reference. */ public UriRoutingContext(final ContainerRequest requestContext) { this.requestContext = requestContext; this.tracingLogger = TracingLogger.getInstance(requestContext); }
/** * Injection constructor. * * @param requestContext request reference. */ public UriRoutingContext(final ContainerRequest requestContext) { this.requestContext = requestContext; this.tracingLogger = TracingLogger.getInstance(requestContext); }
/** * Constructor initializes common properties of this abstract class. * * @param rawType raw Java entity type. * @param type generic Java entity type. * @param annotations Annotations on the formal declaration of the resource * method parameter that is the target of the message body * conversion. See {@link InterceptorContext#getAnnotations()}. * @param mediaType MediaType of HTTP entity. See {@link InterceptorContext#getMediaType()}. * @param propertiesDelegate request-scoped properties delegate. */ public InterceptorExecutor(final Class<?> rawType, final Type type, final Annotation[] annotations, final MediaType mediaType, final PropertiesDelegate propertiesDelegate) { super(); this.type = rawType; this.genericType = type; this.annotations = annotations; this.mediaType = mediaType; this.propertiesDelegate = propertiesDelegate; this.tracingLogger = TracingLogger.getInstance(propertiesDelegate); }
/** * Constructor initializes common properties of this abstract class. * * @param rawType raw Java entity type. * @param type generic Java entity type. * @param annotations Annotations on the formal declaration of the resource * method parameter that is the target of the message body * conversion. See {@link InterceptorContext#getAnnotations()}. * @param mediaType MediaType of HTTP entity. See {@link InterceptorContext#getMediaType()}. * @param propertiesDelegate request-scoped properties delegate. */ public InterceptorExecutor(final Class<?> rawType, final Type type, final Annotation[] annotations, final MediaType mediaType, final PropertiesDelegate propertiesDelegate) { super(); this.type = rawType; this.genericType = type; this.annotations = annotations; this.mediaType = mediaType; this.propertiesDelegate = propertiesDelegate; this.tracingLogger = TracingLogger.getInstance(propertiesDelegate); }
public Responder(final RequestProcessingContext processingContext, final ServerRuntime runtime) { this.processingContext = processingContext; this.runtime = runtime; this.tracingLogger = TracingLogger.getInstance(processingContext.request()); }
public Responder(final RequestProcessingContext processingContext, final ServerRuntime runtime) { this.processingContext = processingContext; this.runtime = runtime; this.tracingLogger = TracingLogger.getInstance(processingContext.request()); }
@Override public final Response dispatch(Object resource, ContainerRequest request) throws ProcessingException { Response response = null; try { response = doDispatch(resource, request); } finally { TracingLogger.getInstance(request).log(ServerTraceEvent.DISPATCH_RESPONSE, response); } return response; }
@Override public final Response dispatch(Object resource, ContainerRequest request) throws ProcessingException { Response response = null; try { response = doDispatch(resource, request); } finally { TracingLogger.getInstance(request).log(ServerTraceEvent.DISPATCH_RESPONSE, response); } return response; }
@SuppressWarnings("unchecked") private <T> MessageBodyReader<T> _getMessageBodyReader(final Class<T> c, final Type t, final Annotation[] as, final MediaType mediaType, final MediaType lookup, final PropertiesDelegate propertiesDelegate) { final List<MessageBodyReader> readers = readersCache.get(lookup); if (readers == null) { return null; } final TracingLogger tracingLogger = TracingLogger.getInstance(propertiesDelegate); MessageBodyReader<T> selected = null; final Iterator<MessageBodyReader> iterator = readers.iterator(); while (iterator.hasNext()) { final MessageBodyReader p = iterator.next(); if (isReadable(p, c, t, as, mediaType)) { selected = (MessageBodyReader<T>) p; tracingLogger.log(MsgTraceEvent.MBR_SELECTED, selected); break; } tracingLogger.log(MsgTraceEvent.MBR_NOT_READABLE, p); } if (tracingLogger.isLogEnabled(MsgTraceEvent.MBR_SKIPPED)) { while (iterator.hasNext()) { final MessageBodyReader p = iterator.next(); tracingLogger.log(MsgTraceEvent.MBR_SKIPPED, p); } } return selected; }
@SuppressWarnings("unchecked") private <T> MessageBodyWriter<T> _getMessageBodyWriter(final Class<T> c, final Type t, final Annotation[] as, final MediaType mediaType, final MediaType lookup, final PropertiesDelegate propertiesDelegate) { final List<MessageBodyWriter> writers = writersCache.get(lookup); if (writers == null) { return null; } final TracingLogger tracingLogger = TracingLogger.getInstance(propertiesDelegate); MessageBodyWriter<T> selected = null; final Iterator<MessageBodyWriter> iterator = writers.iterator(); while (iterator.hasNext()) { final MessageBodyWriter p = iterator.next(); if (isWriteable(p, c, t, as, mediaType)) { selected = (MessageBodyWriter<T>) p; tracingLogger.log(MsgTraceEvent.MBW_SELECTED, selected); break; } tracingLogger.log(MsgTraceEvent.MBW_NOT_WRITEABLE, p); } if (tracingLogger.isLogEnabled(MsgTraceEvent.MBW_SKIPPED)) { while (iterator.hasNext()) { final MessageBodyWriter p = iterator.next(); tracingLogger.log(MsgTraceEvent.MBW_SKIPPED, p); } } return selected; }
@SuppressWarnings("unchecked") private <T> MessageBodyReader<T> _getMessageBodyReader(final Class<T> c, final Type t, final Annotation[] as, final MediaType mediaType, final MediaType lookup, final PropertiesDelegate propertiesDelegate) { final List<MessageBodyReader> readers = readersCache.get(lookup); if (readers == null) { return null; } final TracingLogger tracingLogger = TracingLogger.getInstance(propertiesDelegate); MessageBodyReader<T> selected = null; final Iterator<MessageBodyReader> iterator = readers.iterator(); while (iterator.hasNext()) { final MessageBodyReader p = iterator.next(); if (isReadable(p, c, t, as, mediaType)) { selected = (MessageBodyReader<T>) p; tracingLogger.log(MsgTraceEvent.MBR_SELECTED, selected); break; } tracingLogger.log(MsgTraceEvent.MBR_NOT_READABLE, p); } if (tracingLogger.isLogEnabled(MsgTraceEvent.MBR_SKIPPED)) { while (iterator.hasNext()) { final MessageBodyReader p = iterator.next(); tracingLogger.log(MsgTraceEvent.MBR_SKIPPED, p); } } return selected; }
@SuppressWarnings("unchecked") private <T> MessageBodyWriter<T> _getMessageBodyWriter(final Class<T> c, final Type t, final Annotation[] as, final MediaType mediaType, final MediaType lookup, final PropertiesDelegate propertiesDelegate) { final List<MessageBodyWriter> writers = writersCache.get(lookup); if (writers == null) { return null; } final TracingLogger tracingLogger = TracingLogger.getInstance(propertiesDelegate); MessageBodyWriter<T> selected = null; final Iterator<MessageBodyWriter> iterator = writers.iterator(); while (iterator.hasNext()) { final MessageBodyWriter p = iterator.next(); if (isWriteable(p, c, t, as, mediaType)) { selected = (MessageBodyWriter<T>) p; tracingLogger.log(MsgTraceEvent.MBW_SELECTED, selected); break; } tracingLogger.log(MsgTraceEvent.MBW_NOT_WRITEABLE, p); } if (tracingLogger.isLogEnabled(MsgTraceEvent.MBW_SKIPPED)) { while (iterator.hasNext()) { final MessageBodyWriter p = iterator.next(); tracingLogger.log(MsgTraceEvent.MBW_SKIPPED, p); } } return selected; }
TracingLogger tracingLogger = TracingLogger.getInstance(request); if (tracingLogger.isLogEnabled(ServerTraceEvent.START)) { StringBuilder textSB = new StringBuilder();
TracingLogger tracingLogger = TracingLogger.getInstance(request); if (tracingLogger.isLogEnabled(ServerTraceEvent.START)) { StringBuilder textSB = new StringBuilder();
writerInterceptors, injectionManager); final TracingLogger tracingLogger = TracingLogger.getInstance(propertiesDelegate); final long timestamp = tracingLogger.timestamp(MsgTraceEvent.WI_SUMMARY);
writerInterceptors, injectionManager); final TracingLogger tracingLogger = TracingLogger.getInstance(propertiesDelegate); final long timestamp = tracingLogger.timestamp(MsgTraceEvent.WI_SUMMARY);
final TracingLogger tracingLogger = TracingLogger.getInstance(context.request()); tracingLogger.log(ServerTraceEvent.MATCH_PATH_FIND, path);
final TracingLogger tracingLogger = TracingLogger.getInstance(context.request()); tracingLogger.log(ServerTraceEvent.MATCH_PATH_FIND, path);
/** * {@inheritDoc} * <p/> * Routing stage navigates through the nested {@link Router routing hierarchy} * using a depth-first transformation strategy until a request-to-response * inflector is {@link org.glassfish.jersey.process.internal.Inflecting found on * a leaf stage node}, in which case the request routing is terminated and an * {@link org.glassfish.jersey.process.Inflector inflector} (if found) is pushed * to the {@link RoutingContext routing context}. */ @Override public Continuation<RequestProcessingContext> apply(final RequestProcessingContext context) { final ContainerRequest request = context.request(); context.triggerEvent(RequestEvent.Type.MATCHING_START); final TracingLogger tracingLogger = TracingLogger.getInstance(request); final long timestamp = tracingLogger.timestamp(ServerTraceEvent.MATCH_SUMMARY); try { final RoutingResult result = _apply(context, routingRoot); Stage<RequestProcessingContext> nextStage = null; if (result.endpoint != null) { context.routingContext().setEndpoint(result.endpoint); nextStage = getDefaultNext(); } return Continuation.of(result.context, nextStage); } finally { tracingLogger.logDuration(ServerTraceEvent.MATCH_SUMMARY, timestamp); } }
/** * {@inheritDoc} * <p/> * Routing stage navigates through the nested {@link Router routing hierarchy} * using a depth-first transformation strategy until a request-to-response * inflector is {@link org.glassfish.jersey.process.internal.Inflecting found on * a leaf stage node}, in which case the request routing is terminated and an * {@link org.glassfish.jersey.process.Inflector inflector} (if found) is pushed * to the {@link RoutingContext routing context}. */ @Override public Continuation<RequestProcessingContext> apply(final RequestProcessingContext context) { final ContainerRequest request = context.request(); context.triggerEvent(RequestEvent.Type.MATCHING_START); final TracingLogger tracingLogger = TracingLogger.getInstance(request); final long timestamp = tracingLogger.timestamp(ServerTraceEvent.MATCH_SUMMARY); try { final RoutingResult result = _apply(context, routingRoot); Stage<RequestProcessingContext> nextStage = null; if (result.endpoint != null) { context.routingContext().setEndpoint(result.endpoint); nextStage = getDefaultNext(); } return Continuation.of(result.context, nextStage); } finally { tracingLogger.logDuration(ServerTraceEvent.MATCH_SUMMARY, timestamp); } }