<commit_before>package org.mobicents.protocols.ss7.mtp.provider;

import java.io.IOException;
import java.util.Properties;

import org.mobicents.protocols.ConfigurationException;
import org.mobicents.protocols.StartFailedException;

/**
 * Interface for classes able to provide MTP signaling.
 * 
 * @author baranowb
 * 
 */
public interface MtpProvider {

	/**
	 * Sets listener for MTP callbacks. If null is passed internal refence is
	 * cleared.
	 * 
	 * @param lst
	 */
	public void setMtpListener(MtpListener lst);

	/**
	 * Passes argument to MTP layers for processing. Passed buffer should not be
	 * reused after passing to this method!
	 * 
	 * @param msu
	 * @throws IOException
	 *             - when IO can not be performed, ie, link is not up.
	 * @return
	 */
	public void send(byte[] msu) throws IOException;

	/**
	 * Starts this provider implementation. Depending on internal it can start
	 * local MTP process, or M3UA layer.
	 * 
	 * @throws IOException
	 * @throws StartFailedException
	 */
	public void start() throws  StartFailedException;

	/**
	 * Stops this provider. This call clears all references, ie. listener is
	 * cleared as {@link #setMtpListener(MtpListener)} with null argument.
	 */
	public void stop();

	/**
	 * Method which configures implementation. Depending on implementation
	 * different properties are supported. However each property starts with
	 * "mtp." prefix.
	 * 
	 * @param p
	 */
	public void configure(Properties p) throws ConfigurationException;
	/**
	 * Checks if link is up;
	 * @return
	 */
	public boolean isLinkUp();

}<commit_msg>Ident for doc.<commit_after>package org.mobicents.protocols.ss7.mtp.provider;

import java.io.IOException;
import java.util.Properties;

import org.mobicents.protocols.ConfigurationException;
import org.mobicents.protocols.StartFailedException;

/**
 * Interface for classes able to provide MTP signaling.
 * 
 * @author baranowb
 * 
 */
public interface MtpProvider {

	/**
	 * Sets listener for MTP callbacks. If null is passed internal refence is
	 * cleared.
	 * 
	 * @param lst
	 */
	public void setMtpListener(MtpListener lst);

	/**
	 * Passes argument to MTP layers for processing. Passed buffer should not be
	 * reused after passing to this method!
	 * 
	 * @param msu
	 * @throws IOException
	 *             - when IO can not be performed, ie, link is not up.
	 * @return
	 */
	public void send(byte[] msu) throws IOException;

	/**
	 * Starts this provider implementation. Depending on internal it can start
	 * local MTP process, or M3UA layer.
	 * 
	 * @throws IOException
	 * @throws StartFailedException
	 */
	public void start() throws StartFailedException;

	/**
	 * Stops this provider. This call clears all references, ie. listener is
	 * cleared as {@link #setMtpListener(MtpListener)} with null argument.
	 */
	public void stop();

	/**
	 * Method which configures implementation. Depending on implementation
	 * different properties are supported. However each property starts with
	 * "mtp." prefix.
	 * 
	 * @param p
	 */
	public void configure(Properties p) throws ConfigurationException;

	/**
	 * Checks if link is up;
	 * 
	 * @return
	 */
	public boolean isLinkUp();

}
{'fraction_non_alphanumeric': 0.09273182957393483, 'fraction_numerical': 0.0012531328320802004, 'mean_word_length': 3.3980716253443526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '261100', 'n_tokens_mistral': 965, 'n_tokens_neox': 868, 'n_words': 328}