|
|
Sun ONE/Forte/NetBeans provides us with templates to start our RMI project.
It further provides us with an RMI Compiler (rmic) to generate our stubs,
and skeletons if necessary. We'll use the somewhat-standard naming
convention, so our classes break down like so:
-
Chat: our interface.
-
ChatImpl: our chat server. For simplicity, we'll combine the GUI
and the logic, though this is bad object oriented design. In the
future, we should separate these apart.
-
ChatServer: a server class to create server objects.
-
This is essentially a class with a main method that we run to start the
server. It also binds our objects to a naming context.
-
ChatClient: our chat client. See notes above on GUI.
-
ChatImpl_Stub: our stub class, generated by rmic.
-
ChatImpl_Skeleton: our skeleton class, also generated by rmic.
Getting a Stub, Finding the Server
|