@Override public Annotation[] getEntityAnnotations() { return jaxrsResponse.getAnnotations(); }
setEntityClass(built.getEntityClass()); setGenericType(built.getGenericType()); setAnnotations(built.getAnnotations());
else generic = type; Annotation[] annotations = jaxrsResponse.getAnnotations(); if (annotations == null && method != null)
@Override public Annotation[] getEntityAnnotations() { return jaxrsResponse.getAnnotations(); }
@Override public Annotation[] getEntityAnnotations() { return jaxrsResponse.getAnnotations(); }
public ServerResponse(final BuiltResponse response) { this.setEntity(response.getEntity()); this.setAnnotations(response.getAnnotations()); this.setStatus(response.getStatus()); this.setMetadata(response.getMetadata()); this.setEntityClass(response.getEntityClass()); this.setGenericType(response.getGenericType()); this.setReasonPhrase(response.getReasonPhrase()); } }
Annotation[] annotations = jaxrsResponse.getAnnotations(); @SuppressWarnings(value = "unchecked") final MediaType mt = jaxrsResponse.getMediaType();
@Override public void filter(ContainerRequestContext request, ContainerResponseContext response) throws IOException { super.filter(request, response); if (response instanceof ContainerResponseContextImpl) { ContainerResponseContextImpl containerResponseImpl = (ContainerResponseContextImpl) response; EnrichQueryMetrics e = FindAnnotation.findAnnotation(containerResponseImpl.getJaxrsResponse().getAnnotations(), EnrichQueryMetrics.class); if (e != null) { Object entity = response.getEntity(); if (entity instanceof GenericResponse) { @SuppressWarnings("unchecked") GenericResponse<String> qidResponse = (GenericResponse<String>) entity; request.setProperty(QueryCall.class.getName(), new QueryCall(e.methodType(), qidResponse.getResult())); } else if (entity instanceof BaseQueryResponse) { BaseQueryResponse baseResponse = (BaseQueryResponse) entity; request.setProperty(QueryCall.class.getName(), new QueryCall(e.methodType(), baseResponse.getQueryId())); } else if (entity instanceof QueryExecutorBean.ExecuteStreamingOutputResponse) { // The ExecuteStreamingOutputResponse class updates the metrics, no need to do it here } else { log.error("Unexpected response class for metrics annotated query method " + request.getUriInfo().getPath() + ". Response class was " + (entity == null ? "null response" : entity.getClass().toString())); } } } }
setEntityClass(built.getEntityClass()); setGenericType(built.getGenericType()); setAnnotations(built.getAnnotations());
setEntityClass(built.getEntityClass()); setGenericType(built.getGenericType()); setAnnotations(built.getAnnotations());
else generic = type; Annotation[] annotations = jaxrsResponse.getAnnotations(); if (annotations == null && method != null)
else generic = type; Annotation[] annotations = jaxrsResponse.getAnnotations(); if (annotations == null && method != null)
public ServerResponse(final BuiltResponse response) { this.setEntity(response.getEntity()); this.setAnnotations(response.getAnnotations()); this.setStatus(response.getStatus()); this.setMetadata(response.getMetadata()); this.setEntityClass(response.getEntityClass()); this.setGenericType(response.getGenericType()); this.setReasonPhrase(response.getReasonPhrase()); } }
public ServerResponse(BuiltResponse response) { this.setEntity(response.getEntity()); this.setAnnotations(response.getAnnotations()); this.setStatus(response.getStatus()); this.setMetadata(response.getMetadata()); this.setEntityClass(response.getEntityClass()); this.setGenericType(response.getGenericType()); this.setReasonPhrase(response.getReasonPhrase()); } }
Object ent = jaxrsResponse.getEntity(); Type generic = jaxrsResponse.getGenericType(); Annotation[] annotations = jaxrsResponse.getAnnotations(); @SuppressWarnings(value = "unchecked") final MediaType mt = jaxrsResponse.getMediaType();
Annotation[] annotations = jaxrsResponse.getAnnotations(); @SuppressWarnings(value = "unchecked") final MediaType mt = jaxrsResponse.getMediaType();