本文整理了Java中io.tracee.Utilities.generateSessionIdIfNecessary()
方法的一些代码示例,展示了Utilities.generateSessionIdIfNecessary()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utilities.generateSessionIdIfNecessary()
方法的具体详情如下:
包路径:io.tracee.Utilities
类名称:Utilities
方法名:generateSessionIdIfNecessary
[英]Generate session id hash if it doesn't exist in TraceeBackend and configuration asks for one
[中]如果TraceeBackend中不存在会话id哈希,则生成会话id哈希,并且配置会要求它
代码示例来源:origin: io.tracee.inbound/tracee-servlet
@Override
public final void sessionCreated(HttpSessionEvent httpSessionEvent) {
Utilities.generateSessionIdIfNecessary(backend, httpSessionEvent.getSession().getId());
}
代码示例来源:origin: tracee/tracee
@Override
public final void sessionCreated(HttpSessionEvent httpSessionEvent) {
Utilities.generateSessionIdIfNecessary(backend, httpSessionEvent.getSession().getId());
}
代码示例来源:origin: io.tracee.inbound/tracee-servlet
private void httpRequestInitialized(HttpServletRequest request) {
final TraceeFilterConfiguration configuration = backend.getConfiguration();
if (configuration.shouldProcessContext(IncomingRequest)) {
mergeIncomingContextToBackend(request);
}
Utilities.generateRequestIdIfNecessary(backend);
final HttpSession session = request.getSession(false);
if (session != null) {
Utilities.generateSessionIdIfNecessary(backend, session.getId());
}
}
代码示例来源:origin: tracee/tracee
private void httpRequestInitialized(final HttpServletRequest request) {
final TraceeFilterConfiguration configuration = backend.getConfiguration();
if (configuration.shouldProcessContext(IncomingRequest)) {
final Enumeration<String> headers = request.getHeaders(HTTP_HEADER_NAME);
if (headers != null && headers.hasMoreElements()) {
final Map<String, String> contextMap = transportSerialization.parse(Collections.list(headers));
backend.putAll(backend.getConfiguration().filterDeniedParams(contextMap, IncomingRequest));
}
}
Utilities.generateInvocationIdIfNecessary(backend);
final HttpSession session = request.getSession(false);
if (session != null) {
Utilities.generateSessionIdIfNecessary(backend, session.getId());
}
}
}
代码示例来源:origin: tracee/tracee
@Override
public boolean preHandle(final HttpServletRequest request, final HttpServletResponse response, final Object o) {
final TraceeFilterConfiguration configuration = backend.getConfiguration(profileName);
if (configuration.shouldProcessContext(IncomingRequest)) {
@SuppressWarnings("unchecked")
final Enumeration<String> headers = request.getHeaders(incomingHeaderName);
if (headers != null && headers.hasMoreElements()) {
final Map<String, String> parsedContext = httpHeaderSerialization.parse(Collections.list(headers));
backend.putAll(configuration.filterDeniedParams(parsedContext, IncomingResponse));
}
}
Utilities.generateInvocationIdIfNecessary(backend);
final HttpSession session = request.getSession(false);
if (session != null) {
Utilities.generateSessionIdIfNecessary(backend, session.getId());
}
// We add the current TPIC to the response. If the response is commited before we can replace the values with the current state
// the current state is on the wire. -- better than nothing :-) (See #96)
writeHeaderIfUncommitted(response);
return true;
}
内容来源于网络,如有侵权,请联系作者删除!