<commit_before>/****************************************************************
 * Licensed to the Apache Software Foundation (ASF) under one   *
 * or more contributor license agreements.  See the NOTICE file *
 * distributed with this work for additional information        *
 * regarding copyright ownership.  The ASF licenses this file   *
 * to you under the Apache License, Version 2.0 (the            *
 * "License"); you may not use this file except in compliance   *
 * with the License.  You may obtain a copy of the License at   *
 *                                                              *
 *   http://www.apache.org/licenses/LICENSE-2.0                 *
 *                                                              *
 * Unless required by applicable law or agreed to in writing,   *
 * software distributed under the License is distributed on an  *
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
 * KIND, either express or implied.  See the License for the    *
 * specific language governing permissions and limitations      *
 * under the License.                                           *
 ****************************************************************/

package org.apache.james.smtpserver;

import java.util.Map;

import org.apache.commons.logging.Log;

/**
 * All the handlers access this interface to communicate with
 * SMTPHandler object
 */

public interface SMTPSession {

    // Keys used to store/lookup data in the internal state hash map
    public final static String SENDER = "SENDER_ADDRESS";     // Sender's email address
    public final static String RCPT_LIST = "RCPT_LIST";   // The message recipients
    public final static String CURRENT_HELO_MODE = "CURRENT_HELO_MODE"; // HELO or EHLO
    public final static String CURRENT_HELO_NAME = "CURRENT_HELO_NAME"; 
    public final static String SESSION_STATE_MAP = "SESSION_STATE_MAP"; // the Session state 

    /**
     * Returns host name of the client
     *
     * @return hostname of the client
     */
    String getRemoteHost();

    /**
     * Returns host ip address of the client
     *
     * @return host ip address of the client
     */
    String getRemoteIPAddress();

    /**
     * Returns Map that consists of the state of the SMTPSession per mail
     *
     * @return map of the current SMTPSession state per mail
     */
    Map<String, Object> getState();

    /**
     * Resets message-specific, but not authenticated user, state.
     *<commit_msg>Convert comments to java docs<commit_after>/****************************************************************
 * Licensed to the Apache Software Foundation (ASF) under one   *
 * or more contributor license agreements.  See the NOTICE file *
 * distributed with this work for additional information        *
 * regarding copyright ownership.  The ASF licenses this file   *
 * to you under the Apache License, Version 2.0 (the            *
 * "License"); you may not use this file except in compliance   *
 * with the License.  You may obtain a copy of the License at   *
 *                                                              *
 *   http://www.apache.org/licenses/LICENSE-2.0                 *
 *                                                              *
 * Unless required by applicable law or agreed to in writing,   *
 * software distributed under the License is distributed on an  *
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
 * KIND, either express or implied.  See the License for the    *
 * specific language governing permissions and limitations      *
 * under the License.                                           *
 ****************************************************************/

package org.apache.james.smtpserver;

import java.util.Map;

import org.apache.commons.logging.Log;

/**
 * All the handlers access this interface to communicate with
 * SMTPHandler object
 */

public interface SMTPSession {

    // Keys used to store/lookup data in the internal state hash map
    /** Sender's email address */
    public final static String SENDER = "SENDER_ADDRESS";
    /** The message recipients */
    public final static String RCPT_LIST = "RCPT_LIST";  
    /** HELO or EHLO */
    public final static String CURRENT_HELO_MODE = "CURRENT_HELO_MODE";
    public final static String CURRENT_HELO_NAME = "CURRENT_HELO_NAME";
    /** the Session state */
    public final static String SESSION_STATE_MAP = "SESSION_STATE_MAP";

    /**
     * Returns host name of the client
     *
     * @return hostname of the client
     */
    String getRemoteHost();

    /**
     * Returns host ip address of the client
     *
     * @return host ip address of the client
     */
    String getRemoteIPAddress();

    /**
     * Returns Map that consists of the state of the SMTPSession per mail
     *
     * @return map of the current SMTPSession state per mail
     */
    Map<String, Object> getState();

    /**
     * Resets message-specific, but not authenticated user, state.
     *
{'fraction_non_alphanumeric': 0.11898129725427775, 'fraction_numerical': 0.0015917230401910067, 'mean_word_length': 2.322538003965631, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5110067', 'n_tokens_mistral': 1213, 'n_tokens_neox': 1177, 'n_words': 496}