|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rit.chat2.ChatRoom
public class ChatRoom
Class ChatRoom encapsulates the name and multihandle for a chat room.
| Constructor Summary | |
|---|---|
ChatRoom()
Construct a new chat room. |
|
ChatRoom(String theName,
ChatRef theMultihandle)
Construct a new chat room with the given name and multihandle. |
|
| Method Summary | |
|---|---|
void |
disjoin(Chat theChat)
Disjoin the given chat object from this chat room. |
boolean |
equals(Object obj)
Determine if this chat room is equal to the given object. |
int |
hashCode()
Returns a hash code for this chat room. |
void |
join(Chat theChat)
Join the given chat object to this chat room. |
void |
putMessage(String line)
Display the given line of text in the chat log of each chat object that has joined this chat room. |
void |
readExternal(ObjectInput in)
Read this chat room from the given object input stream. |
String |
toString()
Returns a string version of this chat room. |
void |
writeExternal(ObjectOutput out)
Write this chat room to the given object output stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ChatRoom()
public ChatRoom(String theName,
ChatRef theMultihandle)
theName - Name.theMultihandle - Multihandle for interface ChatRef.
NullPointerException - (unchecked exception) Thrown if theName is null or
theMultihandle is null.| Method Detail |
|---|
public void join(Chat theChat)
theChat - Chat object.public void disjoin(Chat theChat)
theChat - Chat object.public void putMessage(String line)
line - Line of text.
public void writeExternal(ObjectOutput out)
throws IOException
writeExternal in interface Externalizableout - Object output stream.
IOException - Thrown if an I/O error occurred.
public void readExternal(ObjectInput in)
throws IOException,
ClassNotFoundException
readExternal in interface Externalizablein - Object input stream.
IOException - Thrown if an I/O error occurred.
ClassNotFoundException - Thrown if a class needed to deserialize this object could not be
found.public boolean equals(Object obj)
equals in class Objectobj - Object to test.
public int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||