|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectjava.rmi.server.RemoteObject
java.rmi.server.RemoteServer
java.rmi.server.UnicastRemoteObject
edu.trinity.cs.bmassing.rmi.ChatPartyImpl
public abstract class ChatPartyImpl
Class for participants in simple chat application. This class contains code common to server and clients. All parties maintain a list of clients.
| Field Summary | |
|---|---|
protected java.util.List<ChatClient> |
clients
|
static java.lang.String |
errorPrefix
Prefix for error messages. |
static java.lang.String |
serverPrefix
Prefix for messages from server. |
| Fields inherited from class java.rmi.server.RemoteObject |
|---|
ref |
| Constructor Summary | |
|---|---|
ChatPartyImpl()
Constructs object. |
|
| Method Summary | |
|---|---|
void |
addClient(ChatClient c)
Adds client. |
void |
broadcast(java.lang.String message)
Sends message to all clients. |
abstract java.lang.String |
getMessagePrefix()
Gets prefix for messages broadcast by this object. |
void |
removeClient(ChatClient c)
Removes client. |
| Methods inherited from class java.rmi.server.UnicastRemoteObject |
|---|
clone, exportObject, exportObject, exportObject, unexportObject |
| Methods inherited from class java.rmi.server.RemoteServer |
|---|
getClientHost, getLog, setLog |
| Methods inherited from class java.rmi.server.RemoteObject |
|---|
equals, getRef, hashCode, toString, toStub |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface edu.trinity.cs.bmassing.rmi.ChatParty |
|---|
display |
| Field Detail |
|---|
protected java.util.List<ChatClient> clients
public static final java.lang.String serverPrefix
public static final java.lang.String errorPrefix
| Constructor Detail |
|---|
public ChatPartyImpl()
throws java.rmi.RemoteException
java.rmi.RemoteException| Method Detail |
|---|
public void addClient(ChatClient c)
throws java.rmi.RemoteException
addClient in interface ChatPartyc - client to add
java.rmi.RemoteException
public void removeClient(ChatClient c)
throws java.rmi.RemoteException
removeClient in interface ChatPartyc - client to remove
java.rmi.RemoteException
public void broadcast(java.lang.String message)
throws java.rmi.RemoteException
broadcast in interface ChatPartymessage - message to send to all
java.rmi.RemoteExceptionpublic abstract java.lang.String getMessagePrefix()
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||