<commit_before>> This document contains documentation for the contextlogger-provider-api module. Click [here](/README.md) to get an overview that TracEE is about.

# contextlogger-provider-api

> The TracEE contextlogger-servlet project offers all interfaces and annotations needed to define custom context data provider.

## Example: Cookie context data provider 

```java
package io.tracee.contextlogger.contextprovider.servlet;

import TraceeContextProvider;
import TraceeContextProviderMethod;
import WrappedContextData;
import io.tracee.contextlogger.contextprovider.Order;
import io.tracee.contextlogger.profile.ProfilePropertyNames;

import javax.servlet.http.Cookie;

/**
 * Context provider for ServletCookieContextProvider.
 * Created by <NAME>, holisticon AG on 24.01.14.
 */
@TraceeContextProvider(displayName = "servletCookies", order = Order.SERVLET)
public final class ServletCookieContextProvider implements WrappedContextData<Cookie> {

    private Cookie cookie;

    public ServletCookieContextProvider() {
    }

    public ServletCookieContextProvider(Cookie cookie) {
        this.cookie = cookie;
    }

    @Override
    public void setContextData(Object instance) throws ClassCastException {
        this.cookie = (Cookie) instance;
    }

    @Override
    public Class<Cookie> getWrappedType() {
        return Cookie.class;
    }
<commit_msg>Update Readme.md [skip ci]<commit_after>> This document contains documentation for the contextlogger-provider-api module. Click [here](/README.md) to get an overview that TracEE is about.

# contextprovider-api

> The TracEE contextprovider-api project offers all interfaces and annotations needed to define custom context data provider.

## Example: Cookie context data provider 

```java
package io.tracee.contextlogger.contextprovider.servlet.contextprovider

import javax.servlet.http.Cookie;

import io.tracee.contextlogger.contextprovider.Order;
import io.tracee.contextlogger.contextprovider.api.TraceeContextProvider;
import io.tracee.contextlogger.contextprovider.api.TraceeContextProviderMethod;
import io.tracee.contextlogger.contextprovider.api.WrappedContextData;

/**
 * Context provider for ServletCookieContextProvider.
 * Created by <NAME>, holisticon AG on 24.01.14.
 */
@TraceeContextProvider(displayName = "servletCookies", order = Order.SERVLET)
public final class ServletCookieContextProvider implements WrappedContextData<Cookie> {

    private Cookie cookie;

    public ServletCookieContextProvider() {
    }

    public ServletCookieContextProvider(Cookie cookie) {
        this.cookie = cookie;
    }

    @Override
    public void setContextData(Object instance) throws ClassCastException {
        this.cookie = (Cookie) instance;
    }

    @Override
    public Class<Cookie> getWrappedType() {
        return Cookie.class;
    }

{'fraction_non_alphanumeric': 0.0784452296819788, 'fraction_numerical': 0.004240282685512367, 'mean_word_length': 4.684738955823293, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6692565', 'n_tokens_mistral': 765, 'n_tokens_neox': 726, 'n_words': 207}