diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 3203e86..0a31912 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -10,18 +10,7 @@ - - - - - - - - - - - @@ -30,28 +19,28 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -63,7 +52,7 @@ - + com.texttwist.client.* @@ -74,87 +63,11 @@ - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + @@ -165,36 +78,91 @@ - - + + - - + + - - + + - - - - + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -210,36 +178,36 @@ - multicastSock - multicastSocke - multicastSocket + Insert y + Insert you + Insert your + Insert your + Insert your d + Registration + Registration uns + R + regisr + regis + registration + registration unsu + registration unsuc + registration unsucce + registration unsuccess + G + GameService is + GameService is T - TTC - TTCi - TTCir - TTCirclC - TTCircl - TTCircle - TTCircleC - C - Callab - Callable - Callable< - isPartia - highscoresPa - j - joinT - joinTimeou - jo - joinTim - joinTime - joinTimeo - joinTimeout - joinTimeoutjoin - TI + TIMEO TIMEOUT + Inse + Insert + Insert w + Insert wo + ga + game is rea + game is read + le letters - words C:\Users\loke\TextTwist\out\production @@ -378,57 +346,57 @@ @@ -694,6 +662,10 @@ - @@ -1500,7 +1472,7 @@ - + @@ -1531,248 +1503,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -1813,16 +1543,6 @@ - - - - - - - - - - @@ -1861,26 +1581,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -1901,14 +1601,6 @@ - - - - - - - - @@ -1928,26 +1620,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -1964,11 +1636,7 @@ - - - - - + @@ -2014,14 +1682,294 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Client/src/com/texttwist/client/pages/GamePage.java b/Client/src/com/texttwist/client/pages/GamePage.java index cf5afe3..fc7e10e 100644 --- a/Client/src/com/texttwist/client/pages/GamePage.java +++ b/Client/src/com/texttwist/client/pages/GamePage.java @@ -97,7 +97,7 @@ public class GamePage extends Page { public void showGameIsReadyAlert(){ //Mostra pannello di conferma che le lettere sono tutte arrivate - new TTDialog("success", "GameService is ready. Press OK to start!", + new TTDialog("success", "Game is ready.
Press OK to start!", new Callable() { @Override public Object call() throws Exception { @@ -133,12 +133,12 @@ public class GamePage extends Page { timer = addTimer( footer, - new Font(Palette.inputBox_font.getFontName(), Font.BOLD, 40), + new Font(Palette.numberFont.getFontName(), Font.BOLD, 35), gameController.timeIsOver(new SwingWorker() { @Override protected Object doInBackground() throws Exception { - new HighscoresPage(window,true); - return null; + new HighscoresPage(window,true); + return null; } }), Config.timeoutGame diff --git a/Client/src/com/texttwist/client/pages/HighscoresPage.java b/Client/src/com/texttwist/client/pages/HighscoresPage.java index 6a18566..e815478 100644 --- a/Client/src/com/texttwist/client/pages/HighscoresPage.java +++ b/Client/src/com/texttwist/client/pages/HighscoresPage.java @@ -58,10 +58,10 @@ public class HighscoresPage extends Page{ ); new TTLabel( - this.isPartialScore ? new Point(150,0) : new Point(200,0), + this.isPartialScore ? new Point(120,0) : new Point(200,0), new Dimension(350,50), this.isPartialScore ? "Scores of the match" : "Highscores", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 38), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 34), null, highscoreContainer ); diff --git a/Client/src/com/texttwist/client/pages/HomePage.java b/Client/src/com/texttwist/client/pages/HomePage.java index 738f11a..c2e5745 100644 --- a/Client/src/com/texttwist/client/pages/HomePage.java +++ b/Client/src/com/texttwist/client/pages/HomePage.java @@ -78,7 +78,7 @@ public class HomePage extends Page { new Point(70,200), new Dimension(350,50), "Don't have an account?", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 24), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 26), null, loginDataContainer ); @@ -87,7 +87,7 @@ public class HomePage extends Page { new Point(360, 200), new Dimension(210, 50), "Register!", - new Font(Palette.inputBox_font.getFontName(), Font.BOLD, 34), + new Font(Palette.textFont.getFontName(), Font.BOLD, 30), null, new Callable() { @Override diff --git a/Client/src/com/texttwist/client/pages/MatchRequestsPage.java b/Client/src/com/texttwist/client/pages/MatchRequestsPage.java index 462441d..d400371 100644 --- a/Client/src/com/texttwist/client/pages/MatchRequestsPage.java +++ b/Client/src/com/texttwist/client/pages/MatchRequestsPage.java @@ -40,7 +40,7 @@ public class MatchRequestsPage extends Page{ new Point(150,0), new Dimension(350,50), "Pending matches", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 38), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 34), null, matchsContainer ); diff --git a/Client/src/com/texttwist/client/pages/MatchSetupPage.java b/Client/src/com/texttwist/client/pages/MatchSetupPage.java index 016dce5..64f7672 100644 --- a/Client/src/com/texttwist/client/pages/MatchSetupPage.java +++ b/Client/src/com/texttwist/client/pages/MatchSetupPage.java @@ -35,10 +35,10 @@ public class MatchSetupPage extends Page{ ); new TTLabel( - new Point(170,0), + new Point(160,0), new Dimension(350,50), "Invite players", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 38), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 38), null, matchSetupContainer ); diff --git a/Client/src/com/texttwist/client/pages/MenuPage.java b/Client/src/com/texttwist/client/pages/MenuPage.java index 964e7c6..4fb6052 100644 --- a/Client/src/com/texttwist/client/pages/MenuPage.java +++ b/Client/src/com/texttwist/client/pages/MenuPage.java @@ -39,7 +39,7 @@ public class MenuPage extends Page{ new Point(25,15), new Dimension(350,20), "Welcome back, " + menuController.getSession().account.userName + "!", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 24), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 24), null, menuBar ); @@ -47,7 +47,7 @@ public class MenuPage extends Page{ new TTButton( new Point(25,70), new Dimension(250,75), - "New GameService!", + "New Game!", new Callable() { @Override public Object call() throws Exception { diff --git a/Client/src/com/texttwist/client/pages/Page.java b/Client/src/com/texttwist/client/pages/Page.java index a2ad578..5154e22 100644 --- a/Client/src/com/texttwist/client/pages/Page.java +++ b/Client/src/com/texttwist/client/pages/Page.java @@ -83,8 +83,7 @@ public class Page { new TTLabelBtn( new Point(500, 0), new Dimension(150, 50), - caption, - null, + caption, new Font(Palette.textFont.getFontName(), Font.ITALIC, 34), null, clickHandler, parent); diff --git a/Client/src/com/texttwist/client/pages/RegisterPage.java b/Client/src/com/texttwist/client/pages/RegisterPage.java index 44f0dbe..2fa0326 100644 --- a/Client/src/com/texttwist/client/pages/RegisterPage.java +++ b/Client/src/com/texttwist/client/pages/RegisterPage.java @@ -37,7 +37,7 @@ public class RegisterPage extends Page { new Point(70,35), new Dimension(400,40), "Insert your datas and press Register!", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 12), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 20), null, registerDataContainer ); diff --git a/Client/src/com/texttwist/client/ui/TTContainer.java b/Client/src/com/texttwist/client/ui/TTContainer.java index 3f968eb..9fac128 100644 --- a/Client/src/com/texttwist/client/ui/TTContainer.java +++ b/Client/src/com/texttwist/client/ui/TTContainer.java @@ -22,7 +22,7 @@ public class TTContainer extends JPanel{ } setBackground(backgroundColor != null ? backgroundColor : new Color(0,0,0,0)); - setFont(Palette.inputBox_font); + setFont(Palette.textFont); setMaximumSize(dimension); if(innerPadding != null) { setLocation(innerPadding); diff --git a/Client/src/com/texttwist/client/ui/TTDialog.java b/Client/src/com/texttwist/client/ui/TTDialog.java index 415f04f..aa107eb 100644 --- a/Client/src/com/texttwist/client/ui/TTDialog.java +++ b/Client/src/com/texttwist/client/ui/TTDialog.java @@ -34,7 +34,6 @@ public class TTDialog extends JFrame { switch (type){ case "alert":{ root.setBorder(BorderFactory.createLineBorder(Palette.dialog_alert)); - } case "success": { root.setBorder(BorderFactory.createLineBorder(Palette.dialog_success)); @@ -46,7 +45,7 @@ public class TTDialog extends JFrame { new Point(60,20), new Dimension(350,50), message, - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 38), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 24), null, root); diff --git a/Client/src/com/texttwist/client/ui/TTGameBox.java b/Client/src/com/texttwist/client/ui/TTGameBox.java index b4fb405..0c12ff3 100644 --- a/Client/src/com/texttwist/client/ui/TTGameBox.java +++ b/Client/src/com/texttwist/client/ui/TTGameBox.java @@ -21,7 +21,7 @@ public class TTGameBox extends TTInputField{ super(position, dimension, placeholder, parent); setBackground(Palette.scrollPanel_backgroundColor); - setFont(Palette.inputBox_font); + setFont(Palette.inputboxFont); setBounds(position.x, position.y, dimension.width, dimension.height); setPreferredSize(dimension); setForeground(Palette.fontColor); @@ -39,7 +39,6 @@ public class TTGameBox extends TTInputField{ e1.printStackTrace(); } } - //Every time i press a key, execute a search of users } }); diff --git a/Client/src/com/texttwist/client/ui/TTInputField.java b/Client/src/com/texttwist/client/ui/TTInputField.java index 8d96fdf..0901ce3 100644 --- a/Client/src/com/texttwist/client/ui/TTInputField.java +++ b/Client/src/com/texttwist/client/ui/TTInputField.java @@ -14,7 +14,7 @@ public class TTInputField extends TTInputBox{ super(); setBackground(Palette.inputBox_backgroundColor); - setFont(Palette.inputBox_font); + setFont(Palette.textFont); setBounds(position.x, position.y, dimension.width, dimension.height); setPreferredSize(dimension); setForeground(Palette.fontColor); diff --git a/Client/src/com/texttwist/client/ui/TTLabel.java b/Client/src/com/texttwist/client/ui/TTLabel.java index 5f748db..beea177 100644 --- a/Client/src/com/texttwist/client/ui/TTLabel.java +++ b/Client/src/com/texttwist/client/ui/TTLabel.java @@ -16,7 +16,7 @@ public class TTLabel extends JLabel{ setBackground(Palette.inputBox_backgroundColor); if(font == null) { - setFont(Palette.inputBox_font); + setFont(Palette.textFont); } else { setFont(font); } diff --git a/Client/src/com/texttwist/client/ui/TTLetter.java b/Client/src/com/texttwist/client/ui/TTLetter.java index 0a6437b..e0abe76 100644 --- a/Client/src/com/texttwist/client/ui/TTLetter.java +++ b/Client/src/com/texttwist/client/ui/TTLetter.java @@ -14,7 +14,7 @@ public class TTLetter extends TTLabel{ super(position, new Dimension(50,50), caption, - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 20), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 30), Palette.fontColor, parent); parent.add(this); diff --git a/Client/src/com/texttwist/client/ui/TTPasswordField.java b/Client/src/com/texttwist/client/ui/TTPasswordField.java index 436ffd5..a3ba113 100644 --- a/Client/src/com/texttwist/client/ui/TTPasswordField.java +++ b/Client/src/com/texttwist/client/ui/TTPasswordField.java @@ -17,7 +17,7 @@ public class TTPasswordField extends JPasswordField{ super(); setBackground(Palette.inputBox_backgroundColor); - setFont(Palette.inputBox_font); + setFont(Palette.textFont); setBounds(position.x, position.y, dimension.width, dimension.height); setPreferredSize(dimension); setForeground(Palette.fontColor); diff --git a/Client/src/com/texttwist/client/ui/TTScrollList.java b/Client/src/com/texttwist/client/ui/TTScrollList.java index c516f62..167c983 100644 --- a/Client/src/com/texttwist/client/ui/TTScrollList.java +++ b/Client/src/com/texttwist/client/ui/TTScrollList.java @@ -13,7 +13,7 @@ public class TTScrollList extends JList { public TTScrollList(Point position, Dimension dimension, ListModel listModel, JPanel parent){ super(listModel); setBackground(Palette.scrollPanel_backgroundColor); - setFont(Palette.inputBox_font); + setFont(Palette.numberFont); setBounds(position.x, position.y, dimension.width, dimension.height); setForeground(Palette.fontColor); diff --git a/Client/src/com/texttwist/client/ui/TTSearchBar.java b/Client/src/com/texttwist/client/ui/TTSearchBar.java index 7d2b793..c1e1b55 100644 --- a/Client/src/com/texttwist/client/ui/TTSearchBar.java +++ b/Client/src/com/texttwist/client/ui/TTSearchBar.java @@ -40,7 +40,7 @@ public class TTSearchBar extends TTContainer{ super(position, dimension, Palette.inputBox_backgroundColor, -1, parent); setBackground(Palette.scrollPanel_backgroundColor); - setFont(Palette.inputBox_font); + setFont(Palette.textFont); setBounds(position.x, position.y, dimension.width, dimension.height); setPreferredSize(dimension); setForeground(Palette.fontColor); @@ -49,7 +49,7 @@ public class TTSearchBar extends TTContainer{ new Point(20,40), new Dimension(350,50), "Add player", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 18), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 18), null, parent); @@ -70,7 +70,7 @@ public class TTSearchBar extends TTContainer{ new Point(305,40), new Dimension(350,50), "Double-Click on item for remove", - new Font(Palette.inputBox_font.getFontName(), Font.ITALIC, 18), + new Font(Palette.textFont.getFontName(), Font.ITALIC, 18), null, parent); diff --git a/Commons/src/constants/Config.java b/Commons/src/constants/Config.java index 31b614b..6c34a01 100644 --- a/Commons/src/constants/Config.java +++ b/Commons/src/constants/Config.java @@ -1,7 +1,8 @@ package constants; /** - * Created by loke on 15/06/2017. + * Author: Lorenzo Iovino on 15/06/2017. + * Description: Config */ public class Config { @@ -16,25 +17,13 @@ public class Config { public static String ScoreMulticastServerURI = "226.226.226.226"; - public static String NotificationServerURI = "localhost"; public static Integer NotificationServerPort = 20000; public static Integer NotificationServerStubPort = 5000; public static String NotificationServerName ="notification"; - - - public static int timeoutGame = 10; - - - public static String getNotificationServerURI(){ - return "rmi://".concat(NotificationServerURI).concat(":").concat(NotificationServerPort.toString()); - } + public static int timeoutGame = 120; public static String getAuthServerURI(){ return "rmi://".concat(AuthServerURI).concat(":").concat(AuthServerPort.toString()); } - public static String getGameServerURI(){ - return "tcp://".concat(GameServerURI).concat(":").concat(GameServerPort.toString()); - } - } diff --git a/Commons/src/constants/Palette.java b/Commons/src/constants/Palette.java index e81b5b0..15f6895 100644 --- a/Commons/src/constants/Palette.java +++ b/Commons/src/constants/Palette.java @@ -3,14 +3,17 @@ package constants; import java.awt.*; /** - * Created by loke on 13/06/2017. + * Author: Lorenzo Iovino on 13/06/2017. + * Description: Palette and Styles */ public class Palette { + public static Color root_backgroundColor = new Color(145,181,88); public static Color inputBox_backgroundColor = new Color(250,250,250); //"#FAFAFA; public static Color button_backgroundColor = new Color(105,130,63); //#69823f - public static Font inputBox_font = new Font("Arial Black", Font.BOLD, 20); - public static Font password_font = new Font("Arial Black", Font.BOLD, 26); + public static Font textFont = new Font("DK Trained Monkey", Font.BOLD, 20); + public static Font inputboxFont = new Font("DK Trained Monkey", Font.BOLD, 18); + public static Font numberFont = new Font("Arial Black", Font.BOLD, 20); public static Color fontColor = new Color(95,0,0); public static Color registerLblBtn_color = new Color(95,0,0); public static Color registerLblBtn_onmouseover_color = new Color(95,0,0, 127); @@ -18,11 +21,5 @@ public class Palette { public static Color scrollPanel_backgroundColor = new Color(220,229,207); public static Color dialog_alert = Color.red; public static Color dialog_success = new Color(53,66,32); - - public static Font button_font = new Font("DK Trained Monkey", Font.BOLD, 25); - - public Palette() { - //TODO fetchare dal server questi dati - } } diff --git a/Commons/src/interfaces/IAuth.java b/Commons/src/interfaces/IAuth.java index 614398c..3e2fcf5 100644 --- a/Commons/src/interfaces/IAuth.java +++ b/Commons/src/interfaces/IAuth.java @@ -1,15 +1,15 @@ package interfaces; -import models.Response; +import models.Response; import java.rmi.Remote; import java.rmi.RemoteException; /** - * Created by loke on 15/06/2017. + * Author: Lorenzo Iovino on 15/06/2017. + * Description: IAuth */ public interface IAuth extends Remote { Response login(String userName, String password) throws RemoteException; Response register(String userName, String password) throws RemoteException; Response logout(String userName, String token, INotificationClient stub) throws RemoteException; - } diff --git a/Commons/src/interfaces/INotificationClient.java b/Commons/src/interfaces/INotificationClient.java index 9e9bfb0..b214de0 100644 --- a/Commons/src/interfaces/INotificationClient.java +++ b/Commons/src/interfaces/INotificationClient.java @@ -5,7 +5,8 @@ import java.rmi.Remote; import java.rmi.RemoteException; /** - * Created by loke on 19/06/2017. + * Author: Lorenzo Iovino on 19/06/2017. + * Description: INotificationClient */ public interface INotificationClient extends Remote{ void sendInvite(String userName, DefaultListModel users) throws RemoteException; diff --git a/Commons/src/interfaces/INotificationServer.java b/Commons/src/interfaces/INotificationServer.java index a1cb9be..2c72c23 100644 --- a/Commons/src/interfaces/INotificationServer.java +++ b/Commons/src/interfaces/INotificationServer.java @@ -4,13 +4,10 @@ import java.rmi.Remote; import java.rmi.RemoteException; /** - * Created by loke on 19/06/2017. + * Author: Lorenzo Iovino on 19/06/2017. + * Description: Main */ public interface INotificationServer extends Remote { - /* registrazione per la callback */ - public void registerForCallback (INotificationClient ClientInterface) throws RemoteException; - - /* cancella registrazione per la callback */ - public void unregisterForCallback (INotificationClient ClientInterface) throws RemoteException; - + void registerForCallback (INotificationClient ClientInterface) throws RemoteException; + void unregisterForCallback (INotificationClient ClientInterface) throws RemoteException; } diff --git a/Commons/src/models/Message.java b/Commons/src/models/Message.java index b3b31bb..1554f51 100644 --- a/Commons/src/models/Message.java +++ b/Commons/src/models/Message.java @@ -2,11 +2,11 @@ package models; import javax.swing.*; import java.io.Serializable; -import java.util.ArrayList; import java.util.regex.Pattern; /** - * Created by loke on 18/06/2017. + * Author: Lorenzo Iovino on 18/06/2017. + * Description: Main */ public class Message implements Serializable { public String sender; diff --git a/Commons/src/models/Response.java b/Commons/src/models/Response.java index e19d90f..d5ce902 100644 --- a/Commons/src/models/Response.java +++ b/Commons/src/models/Response.java @@ -1,9 +1,11 @@ package models; + import org.json.simple.JsonObject; import java.io.Serializable; /** - * Created by loke on 15/06/2017. + * Author: Lorenzo Iovino on 15/06/2017. + * Description: Response */ public class Response implements Serializable{ public String message; diff --git a/Commons/src/models/Session.java b/Commons/src/models/Session.java index 77cea47..346fe97 100644 --- a/Commons/src/models/Session.java +++ b/Commons/src/models/Session.java @@ -1,7 +1,8 @@ package models; /** - * Created by loke on 17/06/2017. + * Author: Lorenzo Iovino on 17/06/2017. + * Description: Main */ public class Session { @@ -12,5 +13,4 @@ public class Session { this.token = token; this.account = account; } - } diff --git a/Commons/src/models/User.java b/Commons/src/models/User.java index 57d6b9e..8a11f8f 100644 --- a/Commons/src/models/User.java +++ b/Commons/src/models/User.java @@ -3,7 +3,8 @@ package models; import java.io.Serializable; /** - * Created by loke on 18/06/2017. + * Author: Lorenzo Iovino on 18/06/2017. + * Description: Main */ public class User implements Serializable{ @@ -20,6 +21,4 @@ public class User implements Serializable{ public void addScore(Integer score){ this.score += score; } - - } diff --git a/Commons/src/utilities/Parse.java b/Commons/src/utilities/Parse.java index 9f38120..3bab4fe 100644 --- a/Commons/src/utilities/Parse.java +++ b/Commons/src/utilities/Parse.java @@ -3,6 +3,7 @@ package utilities; import javafx.util.Pair; import javax.swing.*; + /** * Author: Lorenzo Iovino on 12/07/2017. * Description: This is a module of parse utilities for different purposes diff --git a/Server/src/com/texttwist/server/components/Auth.java b/Server/src/com/texttwist/server/components/Auth.java index dbab769..08dc66b 100644 --- a/Server/src/com/texttwist/server/components/Auth.java +++ b/Server/src/com/texttwist/server/components/Auth.java @@ -35,10 +35,10 @@ public class Auth extends UnicastRemoteObject implements IAuth { return new Response("Registration successfull", 200, null); } else { Server.logger.write("Registration unsuccessfull"); - return new Response("Registration unsuccessfull: Username exist!", 400, null); + return new Response("
Registration unsuccessfull:
Username exist!
", 400, null); } } - return new Response("Registration unsuccessfull! All fields are mandatories", 400, null); + return new Response("
Registration unsuccessfull!
All fields are mandatories
", 400, null); } @Override diff --git a/Server/src/com/texttwist/server/tasks/JoinTimeout.java b/Server/src/com/texttwist/server/tasks/JoinTimeout.java index 162b772..e188b29 100644 --- a/Server/src/com/texttwist/server/tasks/JoinTimeout.java +++ b/Server/src/com/texttwist/server/tasks/JoinTimeout.java @@ -17,7 +17,7 @@ public class JoinTimeout implements Callable { @Override public Boolean call() throws Exception { try { - Thread.currentThread().sleep(1*20*1000); + Thread.currentThread().sleep(7*60*1000); System.out.println("TIMEOUTTTT"); if(match.joinTimeout) { diff --git a/Server/src/com/texttwist/server/tasks/MatchTimeout.java b/Server/src/com/texttwist/server/tasks/MatchTimeout.java index 3738550..f878e63 100644 --- a/Server/src/com/texttwist/server/tasks/MatchTimeout.java +++ b/Server/src/com/texttwist/server/tasks/MatchTimeout.java @@ -26,7 +26,7 @@ public class MatchTimeout implements Callable { @Override public Boolean call() throws Exception { try { - Thread.currentThread().sleep(1*60*1000); //TODO 5*60*1000 + Thread.currentThread().sleep(5*60*1000); //TODO 5*60*1000 match.setUndefinedScorePlayersToZero(); if(match.matchTimeout) { diff --git a/notificationServer.log b/notificationServer.log index 6d11abd..3efbe52 100644 --- a/notificationServer.log +++ b/notificationServer.log @@ -1109,3 +1109,190 @@ LOGGER (Server): Thu Jul 13 02:46:35 CEST 2017 - Login successfull LOGGER (Server): Thu Jul 13 02:47:30 CEST 2017 - Invoked logout with username=a AND token=arlci4cv3ct54q7jh5ddaog8q0 LOGGER (Server): Thu Jul 13 02:47:30 CEST 2017 - Logout successfull LOGGER (Server): Thu Jul 13 02:47:30 CEST 2017 - Logout successfull (but something gone wrong) +LOGGER (Server): Thu Jul 13 02:49:06 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:49:07 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:49:07 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:49:07 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:49:45 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:49:46 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:49:46 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:49:46 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:49:49 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:49:49 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:50:31 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:50:32 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:50:32 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:50:32 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:50:34 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:50:35 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:51:02 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:51:02 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:51:12 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:51:12 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:51:23 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:51:24 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:51:56 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:51:56 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:52:29 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:52:29 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:52:29 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:52:29 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:52:33 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:52:33 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:53:15 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:53:15 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:53:15 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:53:15 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:53:20 CEST 2017 - Invoked login with username=s AND password=s +LOGGER (Server): Thu Jul 13 02:53:20 CEST 2017 - Login unsuccessfull +LOGGER (Server): Thu Jul 13 02:53:25 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:53:25 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:54:02 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:54:02 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:54:02 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:54:02 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:54:11 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:54:11 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:55:48 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:55:48 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:55:48 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:55:48 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:55:53 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:55:53 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:56:39 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:56:39 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:56:49 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 02:56:49 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:57:05 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:57:06 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:57:06 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:57:06 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:57:10 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:57:10 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:57:14 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 02:57:14 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:57:48 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 02:57:49 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 02:57:49 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 02:57:49 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 02:57:53 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 02:57:53 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:57:58 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 02:57:58 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:58:27 CEST 2017 - Invoked logout with username=b AND token=sk5p9tu4hk25fol3u31cdee06k +LOGGER (Server): Thu Jul 13 02:58:27 CEST 2017 - Logout successfull +LOGGER (Server): Thu Jul 13 02:58:27 CEST 2017 - Logout successfull (but something gone wrong) +LOGGER (Server): Thu Jul 13 02:58:28 CEST 2017 - Invoked logout with username=a AND token=ml778mnt44d33d21rp3870aiua +LOGGER (Server): Thu Jul 13 02:58:28 CEST 2017 - Logout successfull +LOGGER (Server): Thu Jul 13 02:58:28 CEST 2017 - Logout successfull (but something gone wrong) +LOGGER (Server): Thu Jul 13 02:58:31 CEST 2017 - Invoked login with username=asd AND password=asd +LOGGER (Server): Thu Jul 13 02:58:31 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 02:58:37 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 02:58:37 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:00:27 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:00:27 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:00:27 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:00:27 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:00:32 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:00:32 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:06:13 CEST 2017 - Invoked login with username=d AND password=a +LOGGER (Server): Thu Jul 13 03:06:13 CEST 2017 - Login unsuccessfull +LOGGER (Server): Thu Jul 13 03:06:19 CEST 2017 - Invoked register with username=asd AND password=asd +LOGGER (Server): Thu Jul 13 03:06:19 CEST 2017 - Registration unsuccessfull +LOGGER (Server): Thu Jul 13 03:07:43 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:07:43 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:07:45 CEST 2017 - Invoked logout with username=a AND token=22449g35rqaeu84oukv441k81f +LOGGER (Server): Thu Jul 13 03:07:45 CEST 2017 - Logout successfull +LOGGER (Server): Thu Jul 13 03:07:45 CEST 2017 - Logout successfull (but something gone wrong) +LOGGER (Server): Thu Jul 13 03:07:48 CEST 2017 - Invoked register with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:07:48 CEST 2017 - Registration unsuccessfull +LOGGER (Server): Thu Jul 13 03:08:45 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:08:45 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:08:46 CEST 2017 - Invoked logout with username=a AND token=t2bfj8sbujh1lnrq42vm82br4v +LOGGER (Server): Thu Jul 13 03:08:46 CEST 2017 - Logout successfull +LOGGER (Server): Thu Jul 13 03:08:46 CEST 2017 - Logout successfull (but something gone wrong) +LOGGER (Server): Thu Jul 13 03:08:48 CEST 2017 - Invoked login with username=dd AND password=aas +LOGGER (Server): Thu Jul 13 03:08:48 CEST 2017 - Login unsuccessfull +LOGGER (Server): Thu Jul 13 03:08:53 CEST 2017 - Invoked register with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:08:53 CEST 2017 - Registration unsuccessfull +LOGGER (Server): Thu Jul 13 03:09:18 CEST 2017 - Invoked register with username=a AND password= +LOGGER (Server): Thu Jul 13 03:09:55 CEST 2017 - Invoked register with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:09:55 CEST 2017 - Registration unsuccessfull +LOGGER (Server): Thu Jul 13 03:10:28 CEST 2017 - Invoked register with username=s AND password= +LOGGER (Server): Thu Jul 13 03:11:05 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:11:05 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:11:05 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:11:05 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:11:14 CEST 2017 - Invoked register with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:11:14 CEST 2017 - Registration unsuccessfull +LOGGER (Server): Thu Jul 13 03:12:43 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:12:44 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:12:44 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:12:44 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:12:49 CEST 2017 - Invoked register with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:12:49 CEST 2017 - Registration unsuccessfull +LOGGER (Server): Thu Jul 13 03:12:59 CEST 2017 - Invoked register with username=a AND password= +LOGGER (Server): Thu Jul 13 03:13:04 CEST 2017 - Invoked login with username=a AND password=dsd +LOGGER (Server): Thu Jul 13 03:13:04 CEST 2017 - Login unsuccessfull +LOGGER (Server): Thu Jul 13 03:13:07 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:13:07 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:13:19 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:13:19 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:14:10 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:14:10 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:14:10 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:14:10 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:14:14 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:14:14 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:14:19 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:14:19 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:19:13 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:19:13 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:19:14 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:19:14 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:19:18 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:19:18 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:19:22 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:19:22 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:20:53 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:20:53 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:20:53 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:20:53 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:20:57 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:20:58 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:21:01 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:21:01 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:21:45 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:21:45 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:21:46 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:21:46 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:21:52 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:21:52 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:21:58 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:21:58 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:25:39 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:25:39 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:25:39 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:25:39 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:25:43 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:25:44 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:25:49 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:25:49 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:26:51 CEST 2017 - Invoked login with username=asd AND password=asd +LOGGER (Server): Thu Jul 13 03:26:51 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:28:44 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:28:44 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:28:44 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:28:44 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:28:50 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:28:50 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:28:54 CEST 2017 - Invoked login with username=b AND password=b +LOGGER (Server): Thu Jul 13 03:28:54 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:30:49 CEST 2017 - Server starting ... +LOGGER (Server): Thu Jul 13 03:30:49 CEST 2017 - Auth Service running at 9999 port... +LOGGER (Server): Thu Jul 13 03:30:49 CEST 2017 - Server started +LOGGER (Server): Thu Jul 13 03:30:49 CEST 2017 - GameService Service is running at 10000 port... +LOGGER (Server): Thu Jul 13 03:30:57 CEST 2017 - Invoked login with username=asd AND password=asd +LOGGER (Server): Thu Jul 13 03:30:57 CEST 2017 - Login successfull +LOGGER (Server): Thu Jul 13 03:31:02 CEST 2017 - Invoked login with username=a AND password=a +LOGGER (Server): Thu Jul 13 03:31:02 CEST 2017 - Login successfull