Java RMI презентация
Содержание
- 2. Remote Method Invocation
- 3. Interfaces (Transparency) To client, remote object looks exactly like a local
- 4. RMI Registry RMI needs a port mapper too: servers can register
- 5. Example Simple program: write interface for remote object: Remote.java implementation of
- 6. Example Step 1: write interface Calculator.java import java.rmi.Remote; import java.rmi.RemoteException; public
- 7. Example Step 2: write remote object CalculatorImpl.java import java.rmi.server.UnicastRemoteObject; import java.rmi.RemoteException;
- 8. Example Implementation class must respect a few constraints: must implement the
- 9. Example Step 3: generate stub and skeleton RMI compiler: $ rmic
- 10. Example Step 4: write server CalculatorServer.java import java.rmi.Naming; public class CalculatorServer
- 11. Example Server program creates CalculatorImpl object. Registers object to local RMI
- 12. Example Step 5: write CalculatorClient.java import java.net.MalformedURLException; public class CalculatorClient {
- 13. Example Before invoking the server, the client must ‘lookup’ the registry:
- 14. Example Step 6: test it! Start the RMI registry: rmiregistry registry
- 15. Using RMI in a Distributed Context First, test your program on
- 16. Method Parameters Transfer Base types (int, float, char) are transferred directly.
- 17. Скачать презентацию
















Слайды и текст этой презентации
Похожие презентации