A B C D G H I L M N P R S T U W

A

addChatListener(ChatListener) - Method in class inf1010.pusle.chat.client.ChatClient
Changes this client's ChatListener.
addUser(String) - Method in class inf1010.pusle.chat.client.ChatFrame
 

B

broadcast(String, Client) - Method in class inf1010.pusle.chat.server.ChatServer
Sends a chat message on the network.

C

charset - Static variable in class inf1010.pusle.chat.ChatUtilities
The character set used by the chat system (UTF-8).
ChatClient - Class in inf1010.pusle.chat.client
A simple chat client for Puslegruppa.
ChatClient(String, int, String) - Constructor for class inf1010.pusle.chat.client.ChatClient
Create a ChatClient and connect it to a server.
ChatFrame - Class in inf1010.pusle.chat.client
 
ChatListener - Interface in inf1010.pusle.chat.client
An interface for classes capable of handling chat messages.
ChatServer - Class in inf1010.pusle.chat.server
A simple chat server capable of serving multiple clients.
ChatServer(int) - Constructor for class inf1010.pusle.chat.server.ChatServer
Creates a ChatServer binding a ServerSocket to the given port.
ChatUtilities - Class in inf1010.pusle.chat
A utility class containing constants for the chat system.
ChatUtilities() - Constructor for class inf1010.pusle.chat.ChatUtilities
 

D

DATA_INDEX - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet indices.
DEFAULT_PORT - Static variable in class inf1010.pusle.chat.ChatUtilities
The default port number used by the chat programs.
DISCONNECT - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

G

getData() - Method in class inf1010.pusle.chat.Message
Gets this message's data.
getType() - Method in class inf1010.pusle.chat.Message
Gets this message's type.

H

handleMessage(Message) - Method in class inf1010.pusle.chat.client.ChatClient
Handles incoming packets not handled by other ChatListeners.
handleMessage(Message) - Method in class inf1010.pusle.chat.client.ChatFrame
Handles incoming packets of certain types.
handleMessage(Message) - Method in interface inf1010.pusle.chat.client.ChatListener
Handle a packet that was received.
HEADER_LENGTH - Static variable in class inf1010.pusle.chat.ChatUtilities
Number of bytes in a packet header.

I

inf1010.pusle.chat - package inf1010.pusle.chat
 
inf1010.pusle.chat.client - package inf1010.pusle.chat.client
 
inf1010.pusle.chat.server - package inf1010.pusle.chat.server
 
INVALID_PACKET - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.
INVALID_USERNAME - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

L

LENGTH_INDEX - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet indices.
LOGIN - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

M

main(String[]) - Static method in class inf1010.pusle.chat.client.ChatClient
Entry point.
main(String[]) - Static method in class inf1010.pusle.chat.server.ChatServer
Entry point.
MAX_LENGTH - Static variable in class inf1010.pusle.chat.ChatUtilities
The maximum length of data sent in a packet.
MESSAGE - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.
Message - Class in inf1010.pusle.chat
A small class containing a packet.
Message(byte, String) - Constructor for class inf1010.pusle.chat.Message
Creates a new message.
MESSAGE_FROM - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

N

NEW_USER - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

P

printMessage(String) - Method in class inf1010.pusle.chat.client.ChatFrame
Prints a message to the chat window.

R

recvMessage(InputStream) - Static method in class inf1010.pusle.chat.ChatUtilities
Receives a message from an input stream.
removeClient(Client) - Method in class inf1010.pusle.chat.server.ChatServer
Disconnects a client and removes it from the list of clients.
removeUser(String) - Method in class inf1010.pusle.chat.client.ChatFrame
 
run() - Method in class inf1010.pusle.chat.client.ChatClient
Listen to the socket until the socket gets closed.
run() - Method in class inf1010.pusle.chat.server.ChatServer
Wait for client connections and add them to the list of clients.

S

sendMessage(byte, String, OutputStream) - Static method in class inf1010.pusle.chat.ChatUtilities
Sends data on an output stream.
sendMessage(String) - Method in class inf1010.pusle.chat.client.ChatClient
Sends a chat message to the server.
sendMessage(String, Client) - Method in class inf1010.pusle.chat.server.ChatServer
Send message to other connected clients.

T

TYPE_INDEX - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet indices.

U

USER_LEFT - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.
USER_LIST - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

W

WELCOME - Static variable in class inf1010.pusle.chat.ChatUtilities
Packet types.

A B C D G H I L M N P R S T U W