public void run() {
ServerSocket serverSocket = null;
try {
serverSocket = new ServerSocket(notificationPort);
while (true) {
new ConnectionThread(serverSocket.accept()).start();
}
} catch (IOException e) {
logger.log(Level.SEVERE, "Error while listening to socket", e);
}
}