Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ***** Added for E49A - JD:
- // Hooking into the connectionClosed method from AbstractClient. Here if the connection is closed by
- // the server a message is printed indicating so, and then the client is terminated.
- @Override
- protected void connectionClosed() {
- System.out.print("Server has terminated. Connection has been closed.");
- System.exit(0);
- }
- // ***** Added for E49A - JD:
- // Hooking into the connectingException method from AbstractClient. Here if an exception is thrown
- // by the client while waiting for messages, a message is printed and the client is terminated.
- @Override
- protected void connectionException(Exception exception) {
- System.out.print("Server has thrown exception. Connection has been closed.");
- System.exit(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement