|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.collab.Server
ucar.unidata.idv.collab.CollabServer
public class CollabServer
This is an extension of Server class
that provides specific support for the collaboration mechanism
within the IDV.
This class does 2 things. First it overwrites the base clas method createClient to create CollabClient objects. Second it routes the server calls (e.g., handleIncomingMessage, notifyClientAdd, etc.) to the CollabManager
| Field Summary |
|---|
| Fields inherited from class ucar.unidata.collab.Server |
|---|
DEFAULT_PORT |
| Constructor Summary | |
|---|---|
CollabServer(CollabManager collabManager,
int port)
Create the server with the given collaboratio manager. |
|
| Method Summary | |
|---|---|
protected Client |
createClient(Socket clientSocket)
Factory method for creating our own CollabClient object. |
void |
handleIncomingMessage(Client client,
String message)
Route the call to the CollabManager |
protected void |
notifyClientAdd(Client client)
Gets called when we have added a new client. |
protected void |
notifyClientRemove(Client client)
Gets called when we have removed a client. |
protected void |
notifyServerStart()
Gets called when we are starting to listen Route the call to the CollabManager |
protected void |
notifyServerStop()
Gets called when we are done running on the server socket Route the call to the CollabManager |
| Methods inherited from class ucar.unidata.collab.Server |
|---|
addClient, addClient, getClients, getIsRunning, hasClients, initClient, logException, main, removeClient, startServer, startServer, stopServer, write, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CollabServer(CollabManager collabManager,
int port)
collabManager - The singleton collab managerport - The port to open a listening socket on| Method Detail |
|---|
protected Client createClient(Socket clientSocket)
throws IOException
createClient in class ServerclientSocket - The socket we are connected to the client with
IOException
public void handleIncomingMessage(Client client,
String message)
handleIncomingMessage in class Serverclient - The client the message came onmessage - The messageprotected void notifyServerStop()
notifyServerStop in class Serverprotected void notifyServerStart()
notifyServerStart in class Serverprotected void notifyClientAdd(Client client)
notifyClientAdd in class Serverclient - The new clientprotected void notifyClientRemove(Client client)
notifyClientRemove in class Serverclient - The removed client
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||