Skip navigation links
B C D E G H I M N O P R S T U V 

B

Broadcast - Class in <Unnamed>
A Broadcast stores a mapping from users to a list of responses.

C

Command - Class in <Unnamed>
Represents a command string sent from a client to the server, after it has been parsed into a more convenient form.
CommandParser - Class in <Unnamed>
 
connected(String) - Static method in class Broadcast
Creates a Broadcast for the case when a user first connects to the server and should be informed of their new nickname

D

deregisterUser(int) - Method in class ServerModel
Informs the model that the client with the given user ID has disconnected from the server.
deregisterUser(int) - Method in interface ServerModelApi
Informs the model that the client with the given user ID has disconnected from the server.
disconnected(String, Set<String>) - Static method in class Broadcast
Creates a Broadcast for the case when a user disconnects from the server and other clients should be informed of this fact.

E

equals(Object) - Method in class Broadcast
 
equals(Object) - Method in class Command
Returns true if two Commands are equal; that is, they produce the same string representation.
error(Command, ServerError) - Static method in class Broadcast
Creates a Broadcast for the case where a client's Command is invalid, and the client should be informed.

G

getChannels() - Method in class ServerModel
Returns a collection of the names of all the channels that are present on the server.
getChannels() - Method in interface ServerModelApi
Returns a collection of the names of all the channels that are present on the server.
getCode() - Method in enum ServerError
 
getNickname(int) - Method in class ServerModel
Returns the nickname currently associated with the given user ID.
getNickname(int) - Method in interface ServerModelApi
Returns the nickname currently associated with the given user ID.
getOwner(String) - Method in class ServerModel
Returns the nickname of the owner of the current channel.
getOwner(String) - Method in interface ServerModelApi
Returns the nickname of the owner of the current channel.
getRegisteredUsers() - Method in class ServerModel
Returns a collection of the nicknames of all users that are registered with the server.
getRegisteredUsers() - Method in interface ServerModelApi
Returns a collection of the nicknames of all users that are registered with the server.
getResponses(ServerModelApi) - Method in class Broadcast
You should not call this method yourself.
getSender() - Method in class Command
Returns the nickname of the client who issued the Command.
getSenderId() - Method in class Command
Returns the user ID of the client who issued the Command.
getUserId(String) - Method in class ServerModel
Returns the user ID currently associated with the given nickname.
getUserId(String) - Method in interface ServerModelApi
Returns the user ID currently associated with the given nickname.
getUsers(String) - Method in class ServerModel
Returns a collection of the nicknames of all the users in a given channel.
getUsers(String) - Method in interface ServerModelApi
Returns a collection of the nicknames of all the users in a given channel.

H

hashCode() - Method in class Broadcast
 

I

isValidName(String) - Static method in class ServerModel
Determines if a given nickname is valid or invalid (contains at least one alphanumeric character, and no non-alphanumeric characters).

M

main(String[]) - Static method in class ServerMain
Initializes and starts a ServerBackend, a ServerModel, and a very basic UI to indicate that the server is running.

N

names(Command, Set<String>, String) - Static method in class Broadcast
A specialized method for creating a Broadcast in the event that a user is added to a channel as the result of a JoinCommand or InviteCommand.

O

okay(Command, Set<String>) - Static method in class Broadcast
Creates a Broadcast for the general case where a client's Command is accepted by the server and should be relayed to the appropriate clients.

P

parse(int, String, String) - Static method in class CommandParser
Parses a string command received from a client into its component parts, and creates a Command object representing it.

R

registerUser(int) - Method in class ServerModel
Informs the model that a client has connected to the server with the given user ID.
registerUser(int) - Method in interface ServerModelApi
Informs the model that a client has connected to the server with the given user ID.

S

ServerError - Enum in <Unnamed>
ServerError is an enumerated type that lists all possible response codes a server can give to a client.
ServerMain - Class in <Unnamed>
 
ServerModel - Class in <Unnamed>
The ServerModel is the class responsible for tracking the state of the server, including its current users and the channels they are in.
ServerModel() - Constructor for class ServerModel
Constructs a ServerModel and initializes any collections needed for modeling the server state.
ServerModelApi - Interface in <Unnamed>
Defines a collection of methods that should be available in the ServerModel class.

T

toString() - Method in class Broadcast
 

U

updateServerModel(ServerModel) - Method in class Command
Processes the command and updates the server model accordingly.

V

valueOf(String) - Static method in enum ServerError
Returns the enum constant of this type with the specified name.
values() - Static method in enum ServerError
Returns an array containing the constants of this enum type, in the order they are declared.
B C D E G H I M N O P R S T U V 
Skip navigation links