package udpchatserver; /** * Title: * Description: * Copyright: Copyright (c) 2001 * Company: * @author * @version 1.0 */ import java.net.*; import java.util.*; import java.io.*; public class ClientsTableEntry{ //This is the class which is used to create the objects that are stored in the table //clients the server is serving to //These objects contain a username, IP, Port, and (in)Active state //One of these are created and stored for every user who signs onto the chat public String Username; public InetAddress ClientIP; public int ClientPort; public boolean ActiveState; public ClientsTableEntry(String NewUsername, InetAddress NewClientIP, int NewClientPort, boolean NewActiveState) { //sets the global value so they can be retieved later Username = NewUsername; ClientIP = NewClientIP; ClientPort = NewClientPort; ActiveState = NewActiveState; } public String GetUsername(){ //getter to return the username of a user return Username; } public InetAddress GetClientIP(){ //getter to return the IP of a user return ClientIP; } public int GetClientPort(){ //getter to return the IP of a user return ClientPort; } public boolean GetActiveState(){ //getter to return the ActiveState of a user return ActiveState; } }