Index

B C D E G H I J K L M N O P R S T U V 
All Classes and Interfaces|All Packages

B

Broadcast - Class in org.cis1200
A Broadcast stores a mapping from users to a list of responses that should be sent to each user.

C

changeNickname(NicknameCommand) - Method in class org.cis1200.ServerModel
This method is called when a user wants to change their nickname.
CHANNEL_ALREADY_EXISTS - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a client attempts to create a channel whose name is already used by another channel on the server.
Command - Class in org.cis1200
A Command represents a string sent from a client to the server, after parsing it into a more convenient form.
Command(int, String) - Constructor for class org.cis1200.Command
Constructor; initializes the private fields of the object.
CommandParser - Class in org.cis1200
The CommandParser class includes a single static method that can convert a String into the appropriate Command object that it represents.
connected(String) - Static method in class org.cis1200.Broadcast
Creates a Broadcast for the case when a user first connects to the server and should be informed of their new nickname
createChannel(CreateCommand) - Method in class org.cis1200.ServerModel
This method is called when a user wants to create a channel.
CreateCommand - Class in org.cis1200
Represents a Command issued by a client to create a new channel.
CreateCommand(int, String, String, boolean) - Constructor for class org.cis1200.CreateCommand
 

D

deregisterUser(int) - Method in class org.cis1200.ServerModel
This method is automatically called by the backend when a client disconnects from the server.
disconnected(String, Collection<String>) - Static method in class org.cis1200.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 org.cis1200.Broadcast
 
equals(Object) - Method in class org.cis1200.Command
Compare two commands Returns true if two Commands are equal; that is, if they produce the same string representation.
error(Command, ServerResponse) - Static method in class org.cis1200.Broadcast
Creates a Broadcast for the case where a client's Command is invalid, and the client should be informed.

G

getChannel() - Method in class org.cis1200.CreateCommand
 
getChannel() - Method in class org.cis1200.InviteCommand
 
getChannel() - Method in class org.cis1200.JoinCommand
 
getChannel() - Method in class org.cis1200.KickCommand
 
getChannel() - Method in class org.cis1200.LeaveCommand
 
getChannel() - Method in class org.cis1200.MessageCommand
 
getChannels() - Method in class org.cis1200.ServerModel
Gets a collection of the names of all the channels that are present on the server.
getCode() - Method in enum class org.cis1200.ServerResponse
 
getMessage() - Method in class org.cis1200.MessageCommand
 
getNewNickname() - Method in class org.cis1200.NicknameCommand
 
getNickname(int) - Method in class org.cis1200.ServerModel
Gets the nickname currently associated with the given user ID.
getOwner(String) - Method in class org.cis1200.ServerModel
Gets the nickname of the owner of the given channel.
getRegisteredUsers() - Method in class org.cis1200.ServerModel
Gets a collection of the nicknames of all users who are registered with the server.
getResponses(ServerModel) - Method in class org.cis1200.Broadcast
You should not call this method yourself.
getSender() - Method in class org.cis1200.Command
Get the nickname of the client who issued the Command.
getSenderId() - Method in class org.cis1200.Command
Get the user ID of the client who issued the Command.
getUserId(String) - Method in class org.cis1200.ServerModel
Gets the user ID currently associated with the given nickname.
getUsersInChannel(String) - Method in class org.cis1200.ServerModel
Gets a collection of the nicknames of all the users in a given channel.
getUserToInvite() - Method in class org.cis1200.InviteCommand
 
getUserToKick() - Method in class org.cis1200.KickCommand
 

H

hashCode() - Method in class org.cis1200.Broadcast
 

I

INVALID_NAME - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a user tries to change his/her nickname to an invalid string.
INVITE_TO_PUBLIC_CHANNEL - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a client attempts to issue an invitation to a channel that is not invite-only.
InviteCommand - Class in org.cis1200
Represents a Command issued by a client to add another client to an invite-only channel owned by the sender.
InviteCommand(int, String, String, String) - Constructor for class org.cis1200.InviteCommand
 
inviteUser(InviteCommand) - Method in class org.cis1200.ServerModel
This method is called when a channel's owner adds a user to that channel.
isInviteOnly() - Method in class org.cis1200.CreateCommand
 
isRunning() - Method in class org.cis1200.ServerBackend
 
isValidName(String) - Static method in class org.cis1200.ServerModel
Determines if a given nickname is valid or invalid (contains at least one alphanumeric character, and no non-alphanumeric characters).

J

JOIN_PRIVATE_CHANNEL - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a client attempts to join a channel to which he or she has not been invited.
joinChannel(JoinCommand) - Method in class org.cis1200.ServerModel
This method is called when a user wants to join a channel.
JoinCommand - Class in org.cis1200
Represents a Command issued by a client to join an existing channel.
JoinCommand(int, String, String) - Constructor for class org.cis1200.JoinCommand
 

K

KickCommand - Class in org.cis1200
Represents a Command issued by a client to remove another client from a channel owned by the sender.
KickCommand(int, String, String, String) - Constructor for class org.cis1200.KickCommand
 
kickUser(KickCommand) - Method in class org.cis1200.ServerModel
This method is called when a channel's owner removes a user from that channel.

L

leaveChannel(LeaveCommand) - Method in class org.cis1200.ServerModel
This method is called when a user wants to leave a channel.
LeaveCommand - Class in org.cis1200
Represents a Command issued by a client to leave a channel.
LeaveCommand(int, String, String) - Constructor for class org.cis1200.LeaveCommand
 

M

main(String[]) - Static method in class org.cis1200.ServerMain
 
MessageCommand - Class in org.cis1200
Represents a Command issued by a client to send a message to all other clients in the channel.
MessageCommand(int, String, String, String) - Constructor for class org.cis1200.MessageCommand
 

N

NAME_ALREADY_IN_USE - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a client attempts to change his or her nick to a nickname that is already in use by another user.
names(Command, Collection<String>, String) - Static method in class org.cis1200.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.
NicknameCommand - Class in org.cis1200
Represents a Command issued by a client to change his or her nickname.
NicknameCommand(int, String, String) - Constructor for class org.cis1200.NicknameCommand
 
NO_SUCH_CHANNEL - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when the channel specified in a command is not recognized by the server.
NO_SUCH_USER - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when the target specified in the command is not registered on the server.

O

okay(Command, Collection<String>) - Static method in class org.cis1200.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.
OKAY - Enum constant in enum class org.cis1200.ServerResponse
Response indicating no error has occurred.
org.cis1200 - package org.cis1200
 

P

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

R

registerUser(int) - Method in class org.cis1200.ServerModel
This method is automatically called by the backend when a new client connects to the server.
run() - Method in class org.cis1200.ServerBackend
 

S

sendMessage(MessageCommand) - Method in class org.cis1200.ServerModel
This method is called when a user wants to send a message to a channel.
ServerBackend - Class in org.cis1200
The ServerBackend handles networking and communication with clients, and is responsible for managing the server state and executing tasks.
ServerBackend(ServerModel) - Constructor for class org.cis1200.ServerBackend
 
ServerMain - Class in org.cis1200
Initializes and starts a ServerBackend, a ServerModel, and a very basic UI to indicate that the server is running.
ServerModel - Class in org.cis1200
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 org.cis1200.ServerModel
Constructs a ServerModel.
ServerResponse - Enum Class in org.cis1200
ServerResponse is an enumerated type that lists all possible response codes a server can send to a client.
stop() - Method in class org.cis1200.ServerBackend
 

T

toString() - Method in class org.cis1200.Broadcast
 
toString() - Method in class org.cis1200.CreateCommand
 
toString() - Method in class org.cis1200.InviteCommand
 
toString() - Method in class org.cis1200.JoinCommand
 
toString() - Method in class org.cis1200.KickCommand
 
toString() - Method in class org.cis1200.LeaveCommand
 
toString() - Method in class org.cis1200.MessageCommand
 
toString() - Method in class org.cis1200.NicknameCommand
 

U

updateServerModel(ServerModel) - Method in class org.cis1200.Command
Process the command and update the server model accordingly.
updateServerModel(ServerModel) - Method in class org.cis1200.CreateCommand
 
updateServerModel(ServerModel) - Method in class org.cis1200.InviteCommand
 
updateServerModel(ServerModel) - Method in class org.cis1200.JoinCommand
 
updateServerModel(ServerModel) - Method in class org.cis1200.KickCommand
 
updateServerModel(ServerModel) - Method in class org.cis1200.LeaveCommand
 
updateServerModel(ServerModel) - Method in class org.cis1200.MessageCommand
 
updateServerModel(ServerModel) - Method in class org.cis1200.NicknameCommand
 
USER_NOT_IN_CHANNEL - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a client attempts to send a command requiring the sender to be in the specified channel to a channel in which he or she is not a member.
USER_NOT_OWNER - Enum constant in enum class org.cis1200.ServerResponse
Response by the server when a client which does not own a channel attempts to send a command that is restricted to the owner; currently, the only such command is KICK.

V

valueOf(String) - Static method in enum class org.cis1200.ServerResponse
Returns the enum constant of this class with the specified name.
values() - Static method in enum class org.cis1200.ServerResponse
Returns an array containing the constants of this enum class, in the order they are declared.
B C D E G H I J K L M N O P R S T U V 
All Classes and Interfaces|All Packages