close sbe

This commit is contained in:
Jérémi N ‘EndMove’ 2022-03-20 13:01:05 +01:00
parent 420e774e07
commit 1943ab87a2
Signed by: EndMove
GPG Key ID: 65C4A02E1F5371A4

View File

@ -91,7 +91,7 @@ public class StoreProcessor extends UnicastThread implements AutoCloseable {
} catch (IOException exception) {
System.out.println("[ERROR] Problem with SBE (" + domain + ") : " + exception.getMessage());
this.setRunning(false);
this.close();
}
}
@ -143,6 +143,20 @@ public class StoreProcessor extends UnicastThread implements AutoCloseable {
}
}
/**
* AutoClosable Function
* Close the Storage thread and resources.
*
* @since 1.0
*/
@Override
public void close() {
if (this.isRunning()) {
this.setRunning(false);
System.out.println("[SBE] Fermeture de " + domain);
}
}
/**
* Compare two StoreProcessor object to check if equals.
*/
@ -170,7 +184,6 @@ public class StoreProcessor extends UnicastThread implements AutoCloseable {
return this.domain;
}
/**
* Permet de mettre à jours la dernière annonce de ce SBE au FFE
*/