WhiteBoard Using RMI
WSU CEG 7370 WhiteBoard Using Java RMI
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
WhiteBoard.WbClientImpl Class Reference
+ Inheritance diagram for WhiteBoard.WbClientImpl:
+ Collaboration diagram for WhiteBoard.WbClientImpl:

Public Member Functions

void pleaseDie () throws java.rmi.RemoteException
 
void recvDisplayObj (LinesFrame s)
 
void sendAllLines () throws java.rmi.RemoteException
 
void sendLine (LineCoords ln)
 
void updateBoard (LineCoords ln) throws java.rmi.RemoteException
 
 WbClientImpl (String[] args) throws Exception
 

Static Public Member Functions

static void main (String args[])
 

Private Member Functions

void makeMyLinesFrame (String[] args) throws Exception
 

Private Attributes

Color myColor
 
LinesFrame myLinesFrame
 
String thisMcnm
 
WbServer wbServer
 

Detailed Description

Definition at line 10 of file WbClientImpl.java.

Constructor & Destructor Documentation

WhiteBoard.WbClientImpl.WbClientImpl ( String[]  args) throws Exception

Definition at line 25 of file WbClientImpl.java.

References WhiteBoard.Invoke.lookup(), WhiteBoard.WbClientImpl.makeMyLinesFrame(), WhiteBoard.WbClientImpl.myColor, WhiteBoard.WbClientImpl.thisMcnm, and WhiteBoard.WbClientImpl.wbServer.

Referenced by WhiteBoard.WbClientImpl.main().

25  {
26  // args = [clientId, brdNm, displayMcnm, wbserverURL, color]
27  super();
28 
29  myBoardNm = args[1];
30  myURL = Invoke.makeURL('C', args[0]);
31  Naming.rebind(myURL, this);
32  Invoke.myPrint("WbClientImpl", "did Naming.rebind " + myURL);
33 
34  thisMcnm = java.net.InetAddress.getLocalHost().getHostName();
35  makeMyLinesFrame(args);
36  myServerURL = args[3];
37  wbServer = (WbServer) Invoke.lookup(myServerURL);
38  myColor = new Color(Integer.parseInt(args[4], 16));
39  Invoke.myPrint("WbClient waiting for", "recvDisplayObj");
40  // addClient() occurs in recvDisplayObj()
41  }
void makeMyLinesFrame(String[] args)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Function Documentation

static void WhiteBoard.WbClientImpl.main ( String  args[])
static

Definition at line 76 of file WbClientImpl.java.

References WhiteBoard.WbClientImpl.WbClientImpl().

76  {
77  try {WbClientImpl me = new WbClientImpl(args);}
78  catch (Exception e) {e.printStackTrace();}
79  }
WbClientImpl(String[] args)

+ Here is the call graph for this function:

void WhiteBoard.WbClientImpl.makeMyLinesFrame ( String[]  args) throws Exception
private

Definition at line 20 of file WbClientImpl.java.

References WhiteBoard.WbClientImpl.thisMcnm.

Referenced by WhiteBoard.WbClientImpl.WbClientImpl().

20  {
21  Invoke.javaVM
22  ('L', args[1] + " " + args[2] + " " + thisMcnm + " " + args[0]);
23  }

+ Here is the caller graph for this function:

void WhiteBoard.WbClientImpl.pleaseDie ( ) throws java.rmi.RemoteException

Implements WhiteBoard.WbClient.

Definition at line 67 of file WbClientImpl.java.

67  {
68  try {
69  wbServer.delClient(this, myBoardNm);
70  Naming.unbind(myURL);
71  } catch (Exception e) {e.printStackTrace();}
72  Invoke.myPrint("WbClient ", myURL + " exits");
73  System.exit(0);
74  }
void WhiteBoard.WbClientImpl.recvDisplayObj ( LinesFrame  s)

Implements WhiteBoard.WbClient.

Definition at line 60 of file WbClientImpl.java.

References WhiteBoard.WbClientImpl.myLinesFrame.

60  {
61  Invoke.myPrint("WbClient waiting Ended", "" + s);
62  myLinesFrame = s;
63  try {wbServer.addClient(this, myBoardNm);}
64  catch (Exception e) {e.printStackTrace();}
65  }
void WhiteBoard.WbClientImpl.sendAllLines ( ) throws java.rmi.RemoteException

Implements WhiteBoard.WbClient.

Definition at line 50 of file WbClientImpl.java.

50  {
51  wbServer.sendAllLines(this, myBoardNm);
52  }
void WhiteBoard.WbClientImpl.sendLine ( LineCoords  ln)

Implements WhiteBoard.WbClient.

Definition at line 54 of file WbClientImpl.java.

References WhiteBoard.WbClientImpl.myColor.

54  {
55  ln.c = myColor;
56  try {wbServer.addLine(ln, myBoardNm);}
57  catch (Exception e) {e.printStackTrace();}
58  }
void WhiteBoard.WbClientImpl.updateBoard ( LineCoords  ln) throws java.rmi.RemoteException

Implements WhiteBoard.WbClient.

Definition at line 44 of file WbClientImpl.java.

44  {
45  myLinesFrame.recvOneLine(ln);
46  }

Member Data Documentation

Color WhiteBoard.WbClientImpl.myColor
private
LinesFrame WhiteBoard.WbClientImpl.myLinesFrame
private

Definition at line 17 of file WbClientImpl.java.

Referenced by WhiteBoard.WbClientImpl.recvDisplayObj().

String WhiteBoard.WbClientImpl.thisMcnm
private
WbServer WhiteBoard.WbClientImpl.wbServer
private

Definition at line 14 of file WbClientImpl.java.

Referenced by WhiteBoard.WbClientImpl.WbClientImpl().


The documentation for this class was generated from the following file:
Copyright © 2014 www.wright.edu/~pmateti;   thanks to doxygen