@Override public ContainerRequest getContainerRequest() { return acr.getContainerRequest(); }
@Override public ContainerRequest getContainerRequest() { return acr.getContainerRequest(); }
@Override public ContainerRequest getContainerRequest() { return acr.getContainerRequest(); }
/** * Method to intercept outgoing response. * * @return value of the intercepted method */ @Around("execution(public void com.sun.jersey.spi.container.ContainerResponse.write())") public Object operationWriteResponse(final ProceedingJoinPoint thisJoinPoint) throws Throwable { // NOCS (Throwable) if (!CTRLINST.isMonitoringEnabled()) { return thisJoinPoint.proceed(); } final String signature = this.signatureToLongString(thisJoinPoint.getSignature()); if (!CTRLINST.isProbeActivated(signature)) { return thisJoinPoint.proceed(); } final long traceId = CF_REGISTRY.recallThreadLocalTraceId(); if (traceId == -1) { // Kieker trace Id not registered. Should not happen, since this is a response message! LOGGER.warn("Kieker traceId not registered. Will unset all threadLocal variables and return."); return thisJoinPoint.proceed(); } final String sessionId = SESSION_REGISTRY.recallThreadLocalSessionId(); final ContainerResponse containerResponse = (ContainerResponse) thisJoinPoint.getTarget(); final MultivaluedMap<String, Object> responseHeader = containerResponse.getHttpHeaders(); // Pass back trace id, session id, eoi but not ess (use old value before the request) final List<Object> responseHeaderList = new ArrayList<>(); responseHeaderList.add(Long.toString(traceId) + "," + sessionId + "," + Integer.toString(CF_REGISTRY.recallThreadLocalEOI())); responseHeader.put(JerseyHeaderConstants.OPERATION_EXECUTION_JERSEY_HEADER, responseHeaderList); LOGGER.debug("Sending response with header = {} to the request: {}", responseHeader.toString(), containerResponse.getContainerRequest().getRequestUri()); return thisJoinPoint.proceed(); }
responseHeader.put(JerseyHeaderConstants.OPERATION_EXECUTION_JERSEY_HEADER, responseHeaderList); if (LOG.isDebugEnabled()) { LOG.debug("Sending response with header = " + responseHeader.toString() + " to the request: " + containerResponse.getContainerRequest().getRequestUri());
String path = response.getContainerRequest().getPath(); r = resumeCandidates.remove(path.substring(path.lastIndexOf("/") + 1));
T originalScope = getScopeFromCookies(containerResponse.getContainerRequest()); if (originalScope != null && originalScope.equals(cookieScope)) { return;