Codota Logo
TraceeFilterConfiguration.shouldProcessContext
Code IndexAdd Codota to your IDE (free)

How to use
shouldProcessContext
method
in
de.holisticon.util.tracee.configuration.TraceeFilterConfiguration

Best Java code snippets using de.holisticon.util.tracee.configuration.TraceeFilterConfiguration.shouldProcessContext (Showing top 8 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Point p =
  • Codota Iconnew Point(x, y)
  • Codota Iconnew Point()
  • Codota IconMouseEvent e;e.getPoint()
  • Smart code suggestions by Codota
}
origin: de.holisticon.util.tracee.inbound/tracee-servlet

private void writeContextToResponse(HttpServletResponse response, TraceeFilterConfiguration configuration) {
  if (configuration.shouldProcessContext(OutgoingResponse) && !backend.isEmpty()) {
    final Map<String, String> filteredContext = backend.getConfiguration(profile).filterDeniedParams(backend, OutgoingResponse);
    response.setHeader(HTTP_HEADER_NAME, transportSerialization.render(filteredContext));
  }
}
origin: de.holisticon.util.tracee.inbound/tracee-springmvc

@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object o, ModelAndView modelAndView) throws Exception {
  final TraceeFilterConfiguration configuration = backend.getConfiguration(profileName);
  if (configuration.shouldProcessContext(OutgoingResponse) && !backend.isEmpty()) {
    final Map<String, String> filteredContext = configuration.filterDeniedParams(backend, OutgoingResponse);
    response.setHeader(outgoingHeaderName, httpJsonHeaderSerialization.render(filteredContext));
  }
  backend.clear();
}
origin: de.holisticon.util.tracee.inbound/tracee-servlet

void httpRequestInitialized(HttpServletRequest request) {
  final TraceeFilterConfiguration configuration = backend.getConfiguration();
  if (configuration.shouldProcessContext(IncomingRequest)) {
    mergeIncomingContextToBackend(request);
  }
  if (configuration.shouldGenerateRequestId() && !backend.containsKey(TraceeConstants.REQUEST_ID_KEY)) {
    backend.put(TraceeConstants.REQUEST_ID_KEY, Utilities.createRandomAlphanumeric(configuration.generatedRequestIdLength()));
  }
  if (configuration.shouldGenerateSessionId() && !backend.containsKey(TraceeConstants.SESSION_ID_KEY)) {
    final HttpSession session = request.getSession(false);
    if (session != null) {
      backend.put(TraceeConstants.SESSION_ID_KEY, anonymizedSessionKey(session.getId(), configuration.generatedSessionIdLength()));
    }
  }
}
origin: de.holisticon.util.tracee.inbound/tracee-springmvc

@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object o) throws Exception {
  final TraceeFilterConfiguration configuration = backend.getConfiguration(profileName);
  if (configuration.shouldProcessContext(IncomingRequest))
    mergeIncomingContextToBackend(request, configuration);
  // create random RequestId if not already set
  if (!backend.containsKey(TraceeConstants.REQUEST_ID_KEY) && configuration.shouldGenerateRequestId()) {
    backend.put(TraceeConstants.REQUEST_ID_KEY, Utilities.createRandomAlphanumeric(configuration.generatedRequestIdLength()));
  }
  // create another random id to identify the http session
  if (!backend.containsKey(TraceeConstants.SESSION_ID_KEY) && configuration.shouldGenerateSessionId()) {
    final HttpSession session = request.getSession(false);
    if (session != null) {
      backend.put(TraceeConstants.SESSION_ID_KEY, Utilities.createAlphanumericHash(session.getId(),
          configuration.generatedSessionIdLength()));
    }
  }
  return true;
}
origin: de.holisticon.util.tracee/tracee-jaxws

protected final void handleIncoming(final SOAPMessageContext context) {
  final SOAPMessage msg = context.getMessage();
  final TraceeBackend backend = getTraceeBackend();
  if (msg != null && backend.getConfiguration().shouldProcessContext(OutgoingRequest)) {
    try {
      final SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
      // get soap header
      final SOAPHeader header = env.getHeader();
      if (header != null) {
        parseSoapHeaderToBackend(header);
      }
    } catch (final SOAPException e) {
      e.printStackTrace();
      traceeLogger.error(
          "TraceeClientHandler : Exception occurred during processing of inbound message.", e);
    }
  }
}
origin: de.holisticon.util.tracee/tracee-jaxws

protected final void handleOutgoing(final SOAPMessageContext context) {
  final SOAPMessage msg = context.getMessage();
  final TraceeBackend backend = getTraceeBackend();
  if (msg != null && backend.getConfiguration().shouldProcessContext(IncomingResponse)) {
    try {
      final SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
      // get or create header
      SOAPHeader header = env.getHeader();
      if (header == null) {
        header = env.addHeader();
      }
      final Map<String, String> filteredContext = backend.getConfiguration().filterDeniedParams(backend, IncomingResponse);
      transportSerialization.renderTo(filteredContext, header);
      msg.saveChanges();
    } catch (final SOAPException e) {
      traceeLogger.error("TraceeClientHandler : Exception "
          + "occurred during processing of outbound message.", e);
    }
    context.setMessage(msg);
  }
}
origin: de.holisticon.util.tracee/tracee-jaxws

protected final void handleOutgoing(SOAPMessageContext context) {
  final TraceeBackend backend = getTraceeBackend();
  final SOAPMessage msg = context.getMessage();
  try {
    if (msg != null && backend.getConfiguration().shouldProcessContext(OutgoingResponse)) {
      final SOAPEnvelope env = msg.getSOAPPart().getEnvelope();
      // get or create header
      final SOAPHeader header = getOrCreateHeader(env);
      final Map<String, String> filteredContext = backend.getConfiguration().filterDeniedParams(backend, OutgoingResponse);
      transportSerialization.renderTo(filteredContext, header);
      msg.saveChanges();
      context.setMessage(msg);
    }
  } catch (final SOAPException e) {
    traceeLogger.error("TraceeServerHandler : Exception "
        + "occurred during processing of outbound message.", e);
  } finally {
    // must reset tracee context
    backend.clear();
  }
}
origin: de.holisticon.util.tracee/tracee-jaxws

protected final void handleIncoming(SOAPMessageContext context) {
  final SOAPPart soapPart = context.getMessage().getSOAPPart();
  try {
    final TraceeBackend backend = getTraceeBackend();
    final SOAPHeader header = soapPart.getEnvelope().getHeader();
    if (header != null && backend.getConfiguration().shouldProcessContext(IncomingRequest)) {
      final Map<String, String> parsedContext = transportSerialization.parse(header);
      final Map<String, String> filteredContext = backend.getConfiguration().filterDeniedParams(parsedContext, IncomingRequest);
      getTraceeBackend().putAll(filteredContext);
    }
    // generate request id if it doesn't exist
    if (getTraceeBackend().get(TraceeConstants.REQUEST_ID_KEY) == null
        && getTraceeBackend().getConfiguration().shouldGenerateRequestId()) {
      getTraceeBackend().put(TraceeConstants.REQUEST_ID_KEY,
          Utilities.createRandomAlphanumeric(getTraceeBackend().getConfiguration().generatedRequestIdLength()));
    }
  } catch (final SOAPException e) {
    traceeLogger.error("TraceeServerHandler - Error during precessing of inbound soap header");
  }
}
de.holisticon.util.tracee.configurationTraceeFilterConfigurationshouldProcessContext

Popular methods of TraceeFilterConfiguration

  • filterDeniedParams
    Returns a map that is a filtered copy of the given unfiltered map. It contains only keys, that are a
  • generatedRequestIdLength
  • shouldGenerateRequestId
  • generatedSessionIdLength
  • shouldGenerateSessionId

Popular in Java

  • Start an intent from android
  • getSupportFragmentManager (FragmentActivity)
  • addToBackStack (FragmentTransaction)
  • getSystemService (Context)
  • File (java.io)
    An "abstract" representation of a file system entity identified by a pathname. The pathname may be a
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now