congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
TraceeFilterConfiguration.filterDeniedParams
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: de.holisticon.util.tracee.inbound/tracee-servlet

private void mergeIncomingContextToBackend(HttpServletRequest request) {
  final Enumeration headers = request.getHeaders(HTTP_HEADER_NAME);
  if (headers == null) {
    throw new IllegalStateException("Could not read headers with name '"
        + HTTP_HEADER_NAME + "'. The access seem to be forbidden by the container.");
  }
  final Map<String, String> parsed = new HashMap<String, String>();
  while (headers.hasMoreElements()) {
    parsed.putAll(transportSerialization.parse((String) headers.nextElement()));
  }
  final Map<String, String> filtered = backend.getConfiguration().filterDeniedParams(parsed, IncomingRequest);
  backend.putAll(filtered);
}
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/tracee-jaxws

final void parseSoapHeaderToBackend(SOAPHeader soapHeader) {
  final Map<String, String> parsedContext = transportSerialization.parse(soapHeader);
  final Map<String, String> filteredContext = getTraceeBackend().getConfiguration().filterDeniedParams(parsedContext, OutgoingRequest);
  getTraceeBackend().putAll(filteredContext);
}
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 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 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.configurationTraceeFilterConfigurationfilterDeniedParams

Javadoc

Returns a map that is a filtered copy of the given unfiltered map. It contains only keys, that are allowed to be processed on this channel.

Popular methods of TraceeFilterConfiguration

  • generatedRequestIdLength
  • shouldGenerateRequestId
  • shouldProcessContext
  • generatedSessionIdLength
  • shouldGenerateSessionId

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • onCreateOptionsMenu (Activity)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now