I am quite new to Java RMI. I have read the Sun tutorials as well as some info in a book about distributed systems. Yet, I am quite confused about the task of the server. Although the server is supposed to be easy to design, I don't really get the grisp. My remote interface provides me with the function:
public void login(String name, RemoteInterfaceClient client) throws RemoteException
How should I implement this in the Server class? I don't need obviously to do any checks, or? thank you!
You need to write a class that implements your interface and extends UnicastRemoteObject
. In this way, when you call login method remotely, it will do your work.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.