Projet_JAVA_P2P_STRI2A/src/clientP2P/ClientInterface.java
Louis Royer 23586561a0
Some checks are pending
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/head This commit looks good
flavien's git/Projet_JAVA_P2P_STRI2A/pipeline/pr-master Build started...
Split ClientManagement
into ClientInterface and ClientManagement
2020-04-09 11:45:40 +02:00

42 lines
1.0 KiB
Java

package clientP2P;
import clientP2P.ClientManagement;
import tools.Logger;
import tools.LogLevel;
/** Implementation of P2P-JAVA-PROJECT CLIENT interface
* @author Louis Royer
* @author Flavien Haas
* @author JS Auge
* @version 1.0
*/
public abstract class ClientInterface implements Runnable {
protected ClientManagement clientManagement;
private Logger logger;
/** Constructor with clientManagement and logger.
* @param clientManagement ClientManagement used
* @param logger Logger used
*/
public ClientInterface(ClientManagement clientManagement, Logger logger) {
this.clientManagement = clientManagement;
this.logger = logger;
}
/** Implementation of writeLog
* @param text Text to log
* @param logLevel level of logging
*/
protected void writeLog(String text, LogLevel logLevel) {
logger.write(text, logLevel);
}
/** Implementation of writeLog
* @param e exception to log
* @param logLevel level of logging
*/
protected void writeLog(Exception e, LogLevel logLevel) {
logger.write(e, logLevel);
}
}