<commit_before>package jsettlers.graphics.startscreen;

import jsettlers.common.network.IMatch;

/**
 * This is the network connector the start screen needs.
 * <p>
 * It is used to display the list of active network games.
 * 
 * @author michael
 */
public interface INetworkConnector {
	/**
	 * Lets the user set the address to use. A match update event is sent
	 * shortly afterwards.
	 * 
	 * @param address
	 *            The address as String.
	 */
	public void setServerAddress(String address);

	/**
	 * Gets the currently used server address. Should be the last address set.
	 * 
	 * @return The address
	 */
	public String getServerAddress();

	/**
	 * Sets a listener to notify when the list changes.
	 * 
	 * @param listener
	 *            The lister. May be null, then no listenr is used.
	 */
	public void setListener(INetworkListener listener);

	/**
	 * Gets an array of matches. <br>
	 * NOTE: elements of the array might be null!!
	 * 
	 * @return the array of matches
	 */
	public IMatch[] getMatches();

	/**
	 * This listener is notified whenever the list of matches changed.
	 * 
	 * @author michael
	 */
	interface INetworkListener {
		public void matchListChanged(INetworkConnector connector);
	}
}
<commit_msg>- list of open matches is now retrieved via REST API - implemented XMLEncoder and XMLDecoder<commit_after>package jsettlers.graphics.startscreen;

import jsettlers.common.network.IMatch;

/**
 * This is the network connector the start screen needs.
 * <p>
 * It is used to display the list of active network games.
 * 
 * @author michael
 */
public interface INetworkConnector {
	/**
	 * Lets the user set the address to use and inits retrieving of the open
	 * matches. A match update should be sent shortly afterwards.
	 * 
	 * @param address
	 *            The address as String.
	 */
	public void setServerAddress(String address);

	/**
	 * Gets the currently used server address. Should be the last address set.
	 * 
	 * @return The address
	 */
	public String getServerAddress();

	/**
	 * Sets a listener to notify when the list changes.
	 * 
	 * @param listener
	 *            The lister. May be null, then no listenr is used.
	 */
	public void setListener(INetworkListener listener);

	/**
	 * Gets an array of matches. <br>
	 * NOTE: elements of the array might be null!!
	 * 
	 * @return the array of matches
	 */
	public IMatch[] getMatches();

	/**
	 * terminates the used thread.
	 */
	public void disconnect();

	/**
	 * This listener is notified whenever the list of matches changed.
	 * 
	 * @author michael
	 */
	interface INetworkListener {
		public void matchListChanged(INetworkConnector connector);
	}
}

{'fraction_non_alphanumeric': 0.08793686583990981, 'fraction_numerical': 0.0, 'mean_word_length': 3.015082956259427, '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': '4438661', 'n_tokens_mistral': 798, 'n_tokens_neox': 714, 'n_words': 306}