<commit_before>package org.fiteagle.adapter.docker.mdb;

import java.util.logging.Logger;

import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

import org.fiteagle.api.Adapter;

/**
 * A simple Message Driven Bean that asynchronously receives and processes the messages that are sent to the topic.
 * 
 * @author <NAME> (<EMAIL>)
 * 
 */
@MessageDriven(name = "DockerAdapterMDB", activationConfig = {
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/adapters"),
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
public class DockerAdapter implements MessageListener {
    private final static Logger LOGGER = Logger.getLogger(DockerAdapter.class.toString());

    public void onMessage(Message rcvMessage) {
        TextMessage msg = null;
        try {
            if (rcvMessage instanceof TextMessage) {
                msg = (TextMessage) rcvMessage;
                LOGGER.info("The Docker adapter received a message from adapter topic: " + Adapter.toDebugString(msg));
            } else {
                LOGGER.warning("The Docker adapter received a message of wrong type: " + rcvMessage.getClass().getName());
            }
        } catch (JMSException e) {
            throw new RuntimeException(e);
        }
    }
}<commit_msg>added example for a filter<commit_after>package org.fiteagle.adapter.docker.mdb;

import java.util.logging.Logger;

import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.TextMessage;

import org.fiteagle.api.Adapter;

/**
 * A simple Message Driven Bean that asynchronously receives and processes the messages that are sent to the topic.
 * 
 * @author <NAME> (<EMAIL>)
 * 
 */
@MessageDriven(name = "DockerAdapterMDB", activationConfig = {
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Topic"),
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "topic/adapters"),
        //@ActivationConfigProperty(propertyName = "messageSelector", propertyValue = Adapter.PROPERTY_TYPE + "=DockerAdapter"),
        @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge") })
public class DockerAdapter implements MessageListener {
    private final static Logger LOGGER = Logger.getLogger(DockerAdapter.class.toString());

    public void onMessage(Message rcvMessage) {
        TextMessage msg = null;
        try {
            if (rcvMessage instanceof TextMessage) {
                msg = (TextMessage) rcvMessage;
                LOGGER.info("The Docker adapter received a message from adapter topic: " + Adapter.toDebugString(msg));
            } else {
                LOGGER.warning("The Docker adapter received a message of wrong type: " + rcvMessage.getClass().getName());
            }
        } catch (JMSException e) {
            throw new RuntimeException(e);
        }
    }
}
{'fraction_non_alphanumeric': 0.1003627569528416, 'fraction_numerical': 0.0, 'mean_word_length': 3.5204918032786887, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '2498532', 'n_tokens_mistral': 905, 'n_tokens_neox': 888, 'n_words': 223}