正在加载图片...
Server Development Steps Overview o define a remotable interface Write a class that implements the remotable interface Write a server main program that creates an instance of the implementation object and assigns the object a name o Run the rmic compiler to generate the code for the stubs and skeletons Now let's take a look at the steps involved in writing the object server.We will look at the client side in a few moments. The first thing you need to do is define an interface for the remote object.This interface defines the methods that the client can call remotely.The big difference between a remoteable interface and local interface is that remote methods must throw the exception described on the last page Next,you must write a class that implements the interface Next,you need to write a main program that runs on the server.This program must instantiate one or more of the server objects and then typically registers the remote objects into the RMI name registry so that clients can find the objects. Finally,you need to generate the code for the stubs and skeletons.The JDK provides the rmic tool,which reads the remote object's class file and creates class files for the stubs and skeletons. Server Development Steps Overview Define a remotable interface Write a class that implements the remotable interface Write a server main program that creates an instance of the implementation object and assigns the object a name Run the rmic compiler to generate the code for the stubs and skeletons Now let's take a look at the steps involved in writing the object server. We will look at the client side in a few moments. The first thing you need to do is define an interface for the remote object. This interface defines the methods that the client can call remotely. The big difference between a remoteable interface and local interface is that remote methods must throw the exception described on the last page. Next, you must write a class that implements the interface. Next, you need to write a main program that runs on the server. This program must instantiate one or more of the server objects and then typically registers the remote objects into the RMI name registry so that clients can find the objects. Finally, you need to generate the code for the stubs and skeletons. The JDK provides the rmic tool, which reads the remote object's class file and creates class files for the stubs and skeletons
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有